Tip

Keep track of connections with extensions to the PROMPT command

This tip was submitted to the searchWin2000 Tip Exchange by member Jim Ruby. Let other users know how useful it is by rating the tip below.


Use your PROMPT in a CMD window to keep an eye on where you are. I PUSHD/POPD all day long and sometimes get more drives connected than I can keep track of. By using two extensions to the PROMPT command, I can now tell exactly what I'm connected to all the time.

  • Use the $+ parameter to include a plus sign for every outstanding PUSHD you've done.

  • Use the $M parameter to show the remote name of the drive you're currently connected to. My prompt string, as shown in the code, displays a prompt like the following when I've PUSHD'ed to a remote drive:
     NetServerc Thu 04/04/2002 15:19:42 Y:Winnt +Y:>
    
    In a quick glance, I can tell I'm connected to the Netserver C share after PUSHD'ing once.

Here's a quick synopsis:

 $m - display the remote share name $_ - newline $d - date $t - time $h - three of these erases the hundredths of a second, sometimes you just don't need that much detail! $p - current drive and path $+ - how many outstanding PUSHD's $n - current drive, just an extra reminder $g - greater-than sign set prompt=$m$_$d $t$h$h$h$_$p$_$+$n:$g


    Requires Free Membership to View

This was first published in April 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.