Problem solve Get help with specific problems with your technologies, process and projects.

Keep track of connections with extensions to the PROMPT command

Use your PROMPT in a CMD window to keep an eye on where you are.

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

This was last published in April 2002

Dig Deeper on Enterprise infrastructure management

Start the conversation

Send me notifications when other members comment.

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

Please create a username to comment.