Hide Comments
Purpose:Save the current disk drive and directory, optionally changing to a new drive and directory

 

Format:PUSHD [/X path]

 

pathThe name of the new default drive and directory.

 

/X (exclude)

 

See also: DIRS, POPD, @DIRSTACK and Directory Navigation.

 

Usage:

 

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.

 

This example saves the current directory and changes to C:\WORDP\MEMOS, then returns to the original directory:

 

[c:\] pushd \wordp\memos

[c:\wordp\memos] popd

[c:\]

 

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).

 

If PUSHD cannot change to the directory you have specified it will attempt to search the CDPATH and the extended directory search database. You can also use wildcards in the path to force an extended directory search. Read the section on Directory Navigation for complete details on these and other directory navigation features.

 

Directory changes made with PUSHD are also recorded in the directory history list and can be displayed in the directory history window.

 

The directory stack can hold up to 2047 characters, or about 100 typical entries (depending on the length of the names). If you exceed this limit, the oldest entry is removed before adding a new entry.

 

Options:

 

/XDon't save the current directory to the Directory History list.

 

Created with Help & Manual 6 and styled with Premium Pack Version 2.41 © by EC Software