Thursday, 13 December 2012

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

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 pushdwith no path name to view the current state of the stack. 

No comments:

Post a Comment