Article ID: 317379 - View products that this article applies to.
This article was previously published under Q317379
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.
pushd uncpathFor example, to connect to a share named Sharename on a server named Servername, type the following line, and then press ENTER:
pushd \\servername\sharenameThe 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.
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.
Contact us for more help
Connect with Answer Desk for expert help.