Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

January 17, 2001 12:00 AM

Command Prompt Tricks

Windows IT Pro
InstantDoc ID #16412
Rating: (292)

If you're a frequent command prompt user, you'll appreciate the way this trick simplifies your life. This tip will work on all versions of Windows 2000 and Windows NT. By default, the prompt that the system presents you in a command prompt window shows the current drive letter and the full pathname. This prompt is configurable. For a list of configurable options, go to a command prompt and type

prompt /?

I spend much of my day dealing with remote file systems, so I often find myself wondering exactly where the J drive is mapped to. To refresh memory, I use the Net Use command. To modify the command prompt to reflect the remote path, I typed the following text at a command prompt

prompt $m$_$p$g

where $m echoes the Uniform Naming Convention (UNC) name of the drive letter that the command prompt currently displays; $_ inserts a carriage return and a line feed; and $p$g are the standard drive and pathname. This command caused the system to display the UNC name of my network drive.

To make this change stick on a Win2K system, you must modify an environment variable. You can do so from the Control Panel System applet's Advanced configuration option. All you have to do is click the Environment Variables button, create a system variable named prompt, and set its value to $m$_$p$g. This setting causes the system to display the remote network path every time you open a command prompt.

Related Content:

ARTICLE TOOLS

Comments
  • sonulohat
    3 years ago
    Dec 29, 2009

    hi, i want to learn how to change someone desktop wallpaper with mine one

  • mike
    3 years ago
    Feb 04, 2009

    Lrure

    i would like to know how to make my PC on my school server a "ghost" as u said in one of your posts can u give me detailed instructions

  • Rhino
    4 years ago
    Oct 09, 2008

    in reply to Hundredsouls, what's wrong trying to impress your friends? Adults impress their friends, neighbours, colleagues also by grooming and big cars, talk posh although it's sh^tty, so dont give us any of those grow up cliche, an old fa^t aint of no use no no one, leave us alone and if you are of no help, no one loses.

  • ashok
    4 years ago
    Sep 18, 2008

    GOOD

  • ashok
    4 years ago
    Sep 18, 2008

    hai

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.