Search notes:

cmd.exe - pushd

pushd dir-name pushes the current directory (%CD%) onto the directory stack and cds into the directory given as parameter (dir-name).
The opposite command is popd which gets and removes the most recently directory name off the directory stack and cds back to that directory.
pushd is affected by whether command extensions are enabled or disabled.

Showing pushd directory stack

Without arguments, pushd lists the directory names that are alread stored on the directory stack.
When the environment variable %PROMPT% contains a $+, each level of pushed directories is replaced with a + in the printed prompt in cmd.exe.

See also

cmd.exe: Built-in commands

Index