How To Use the PUSHD Command to Access a UNC Path at a Command Prompt in Windows 2000

Article translations Article translations
Article ID: 317379 - View products that this article applies to.
This article was previously published under Q317379
Expand all | Collapse all

On This Page

SUMMARY

This article describes how to use the pushd command to gain access to a Universal Naming Convention (UNC) path at a command prompt.

You cannot change to a UNC path at a command prompt. However, you can use the pushd command to access a network path. If command extensions are enabled (this is the default in Windows 2000), the pushd command accepts network paths in addition to drive letters and paths. If you specify a network path, the pushd command creates a temporary drive letter that points to the network resource, and then changes the current drive and folder to the new drive letter. Temporary drive letters are allocated starting from Z and then backward through the alphabet, using the first unused drive letter found.

How to Use the PUSHD Command

To use the pushd command, type the following line at a command prompt, where uncpath is the UNC path for the network share that you want to use:
pushd uncpath
For example, to connect to a share named Sharename on a server named Servername, type the following line, and then press ENTER:
pushd \\servername\sharename
The pushd command creates a temporary drive letter that points to the network share, and then changes the command prompt to that drive letter.

You can use the pushd command several times in one session. This creates a list (or "stack") of folders. You can type pushd with no path name to view the current state of the stack.

How to Use the POPD Command

You can use the popd command to remove the top folder from the stack. The popd command returns you to the previous folder, and removes the temporary drive letter that was created by the pushd command.

The pushd and popd commands work together. The pushd command captures the name of the current folder. You can also add the name of a folder to which you want to change. For example, typing pushd \data1 switches you to the DATA1 folder, but remembers the name of the current folder. To return to this folder, type popd.

Properties

Article ID: 317379 - Last Review: October 31, 2006 - Revision: 3.2
APPLIES TO
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional Edition
Keywords: 
kbhowto kbhowtomaster KB317379

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com