Changes the current directory to the directory stored by the pushd command.
popd
/? : Displays help at the command prompt.
| • | 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. |
| • | When command extensions are enabled, the popd command removes any drive-letter assignations created by pushd. |
You can use pushd and popd in a batch program to change the current directory from the one in which the batch program was run and then change it back. The following sample batch program shows how to do this:
@echo off rem This batch file deletes all .txt files in a specified directory pushd %1 del *.txt popd cls echo All text files deleted in the %1 directory
| Format | Meaning |
Italic | Information that the user must supply |
Bold | Elements that the user must type exactly as shown |
Ellipsis (...) | Parameter that can be repeated several times in a command line |
Between brackets ([]) | Optional items |
Between braces ({}); choices separated by pipe (|). Example: {even|odd} | Set of choices from which the user must choose only one |
Courier font | Code or program output |