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 command, type the following line at a command prompt, where uncpath is the UNC path for the network share that you want to use:
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.
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.
Article ID: 317379 - Last Review: Oct 30, 2006 - Revision: 1