Have you ever been working from a Command Prompt and needed to temporarily map a drive letter to a network location for a quick file operation? Of course, you can switch over to Windows Explorer and use the Map Network Drive command on the Tools menu.
While this is a viable solution, it requires multiple steps to create and then you have to perform several more steps to disconnect the network drive. This can be a pain — especially if you just want to work from a Command Prompt.
However, there is another way. You can use the PushD command to quickly create a temporary drive map while remaining in the Command Prompt. You can then use PopD to quickly disconnect the network drive. Here's how:
- Open a Command Prompt window.
- Type the following command line:
PUSHD ServerSharepathwhere \\Server\Share\path is the network resource to which you want to map a drive letter.
As soon as you do, the PUSHD command will instantly map a drive letter to the network resource and then change to that drive right in the Command Prompt window. When you're done, just type POPD and the mapped drive letter will be disconnected and you'll return to your original drive.
Keep in mind that, the PUSHD command allocates drive letters from Z: on down and will use the first unused drive letter that it finds.Note: This tip applies to both Windows XP Home and Windows XP Professional.
Miss a Windows XP tip?
Check out the Windows XP archive, and get more hands-on Windows XP tips.
Stay on top of the latest XP tips and tricks with our free Windows XP newsletter, delivered each Thursday. Automatically sign up today!
Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.