Command: popd
POPD pops a directory off the directory stack (created by
pushd) and changes to it.
Syntax:
1. POPD
2. POPD [*] [/?]
Options:
* Clears the directory stack.
/? Shows the help.
Comments:
The first variant changes the current directory back to the one, in
which the last PUSHD command was executed.
The second one clears all entries of the directory stack, but does
not change the current directory.
POPD is stored in the context segment (directory stack) of of
command.com, for more information see: COMMAND /E:nnn and MEMORY.
POPD is a command internal to command.com and needs no other file
in order to work.
Examples:
this command changes the current directory to / shows:
============ =========================================
cd c:\FREEDOS\BIN c:\FREEDOS\BIN
pushd c:\GAMES c:\GAMES (and stores c:\FREEDOS\BIN)
pushd c:\UTILS c:\UTILS (and stores c:\GAMES)
pushd c:\packages c:\packages (and stores c:\UTILS)
dirs shows the directories stored by pushd:
0001=c:\FREEDOS\BIN
0002=c:\GAMES
0003=c:\UTILS
popd c:\UTILS (and removes c:\UTILS (0003)
from directory stack)
popd c:\GAMES (and removes c:\GAMES (0002)
from directory stack)
popd c:\FREEDOS\BIN (and removes c:\FREEDOS\BIN
(0001) from directory stack)
popd shows the message: "Directory stack empty"
See also:
cd/chdir
cdd
command.com/freecom
dirs
memory
pushd
Copyright © 2004 Robert Platt, updated 2011 and 2022 by W. Spiegl.
This file is derived from the FreeDOS Spec Command HOWTO.
See the file H2Cpying for copying conditions.