|Purpose:||Save the current disk drive and directory, optionally changing to a new drive and directory|
|Format:||PUSHD [/R /X path]|
|path||The name of the new default drive and directory.|
PUSHD saves the current drive and directory to a "last in, first out" directory stack. The POPD command returns to the last drive and directory that was saved by PUSHD. You can use these commands together to change directories, perform some work, and return to the starting drive and directory. The DIRS command displays the contents of the directory stack.
To save the current drive and directory, without changing directories, use the PUSHD command by itself, with no path.
If a path is specified as part of the PUSHD command, the current drive and directory are saved and PUSHD changes to the specified drive and directory. If the path includes a drive letter, PUSHD changes to the specified directory on the new drive without changing the current directory on the original drive.
PUSHD supports Windows shell folder names; see CDD for details.
When you use PUSHD to change to a directory on an LFN drive, you must quote the path name if it contains white space or special characters.
PUSHD can also change to a network drive and directory specified with a UNC name (see File Systems for details).
The directory stack can hold up to 16383 characters, or about 500+ typical entries (depending on the length of the names). If you exceed this limit, the oldest entry is removed before adding a new entry.
Save the current directory and change to C:\WORDP\MEMOS, then return to the original directory:
[c:\] pushd \wordp\memos