| 111 |
| Navigate UNC paths with PUSHD and POPD |
| When you're working in a command console, some of the time you're probably working with |
| network shares that are mapped to local drive letters. If you work with several mapped drives, |
| remembering where each is mapped to can be tough. |
| You could use the command PROMPT $m$_$p$g to display the UNC path as part of the command |
| prompt, but the command prompt doesn't let you enter a UNC path to traverse directories, which |
| would be useful for quickly moving between shared folders. So use the PUSHD and POPD |
| commands to navigate UNC paths instead. |
| PUSHD creates a temporary drive mapping to a specified directory. It starts with Z and works |
| backward until it finds the first unused drive letter, assigns that drive letter to the share, and then |
| automatically switches to that mapped drive as the current directory. You can then work with that |
| share via its drive letter. In effect, PUSHD is similar to mapping a drive with NET USE and then |
| using CD to navigate to it. |
| To map a UNC path and switch to it, enter the command PUSHD <path>, where <path> is the UNC |
| path. Multiple PUSHD commands create a directory stack. To view the stack list, enter the |
| command PUSHD with no other parameters. |
| When you've finished using a folder, use the POPD command to remove it. POPD removes the top |
| folder from the stack, removes the mapping, and then returns you to the previous folder. |
First Previous Next Last |