Popd


Applies To: Windows Vista,Windows Server 2003,Windows Server 2000,Windows Server 2003 R2,Windows 7,Windows Server 2008,Windows XP

Changes the current directory to the directory that was most recently stored by the pushd command.

For examples of how to use this command, see Examples.

Syntax


Copy Code

popd

Parameters

Parameter

Description

/?

Displays help at the command prompt.

Remarks

Examples

The following example shows how you can use the pushd command and the popd command in a batch program to change the current directory from the one in which the batch program was run and then change it back:


Copy Code

@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

Additional references

Command-Line Syntax Key

Pushd