Wednesday, August 25, 2004

Add UNC information to the command prompt

From the TechRepublic Windows XP Tips newsletter. If you’re like most system administrators, you more than likely prefer to perform common tasks using Windows XP’s vast array of command-line tools. If so, here’s another trick to add to your toolbox. Did you know that you can configure the command prompt to display the full UNC of a mapped drive letter? The ability to tell at a glance which server a particular driver letter maps to can save you both time and frustration when working at the command line. All you have to do is add a special character to the Prompt command. Follow these steps:
  1. Press [Windows][Break] to open the System Properties dialog box.
  2. On the Advanced tab, click the Environment Variables button.
  3. In the System Variables section, click the New button.
  4. Enter PROMPT in the Variable Name text box.
  5. Enter $m$p$g in the Variable Value text box.
  6. Click OK three times to close all open dialog boxes.
Now, when you open a command prompt and access a mapped drive letter, you'll see the UNC path in the prompt.

No comments:

Post a Comment