|
PUSHD
Stores the name of the current directory for use by the POPD
command before changing the current directory to the
specified directory.
Syntax
PUSHD pathname
Key
pathname - the folder to make 'current' (UNC names
accepted)
If command extensions are enabled, the PUSHD command accepts
either a network path or a local drive letter and path.
Every time you use the PUSHD command, a single directory is
stored for your use. However, you can store multiple
directories by using the PUSHD command multiple times.
Examples
@Echo Off
Setlocal
Set _folder=%1
Pushd %_folder%
:: Now verify we really moved to the new folder
If /i not "%cd%"=="%_folder% (Echo folder not found &goto :eof)
Echo We are at %cd%
Popd
Echo We are back at %cd%
Cmd Commands
|