popd
The popd command changes the current directory to the directory that was most recently stored by the pushd command. Windows commands reference
On Windows
Windows
The popd command changes the current directory to the directory that was most recently stored by the pushd command. 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. The directories are stored sequentially in a virtual stack, so if you use the pushd command once, the directory in which you use the command is placed at the bottom of the stack. If you use the command again, the second directory is placed on top of the first one. The process repeats every time you use the pushd command. If you use the popd command, the directory on the top of the stack is removed and the current directory is changed to that directory. If you use the popd command again, the next directory on the stack is removed. If command extensions are enabled, the popd command removes any drive-letter assignments created by the pushd command.
popd@echo offrem This batch file deletes all .txt files in a specified directorypushd %1del *.txtpopdclsecho All text files deleted in the %1 directory
/?Displays help at the command prompt.Several platforms
Remove a directory placed on the directory stack via the pushd shell built-in.
Remove the top directory from the stack and cd to it
popdIdentifyRemove the Nth directory (starting from zero to the left from the list printed with dirs)
popd +NIdentifyRemove the Nth directory (starting from zero to the right from the list printed with dirs)
popd -NIdentifyRemove the 1st directory (starting from zero to the left from the list printed with dirs)
popd -nIdentifyWindows
Change the current directory to the directory stored by the pushd command.
Switch to directory at the top of the stack
popdIdentify