Home XP Commands
XP Syntax

PUSHD

Change the current directory/folder and store the previous folder/path for use by the POPD command.

Syntax
      PUSHD pathname 
   
Key
   pathname - the folder to make 'current' (UNC names accepted)

Example

c:\Program Files> PUSHD c:\utils
c:\utils> 
c:\utils> POPD
c:\Program Files>
   
c:\Program Files> PUSHD \\Server_23\MyShare\MyFolder
Z:\MyFolder>
Z:\MyFolder> POPD
c:\Program Files>


Networks
When a UNC path is specified, PUSHD will create a temporary drive map and will then use that new drive.

Temporary drive letters are allocated in reverse alphabetical order
so if Z: is free it will be used.

If Command Extensions are disabled the PUSHD command will not accept a network (UNC) path.

"One of the phrases that kept running through the conversation was 'pushing the outside of the envelope' The envelope was a flight test term referring to the limits of a particular aircraft" - Tom Wolfe (The Right Stuff)

Related commands

CD - Change directory
CMD - UNC options
PROMPT - Display the level of the PUSHD stack

Equivalent Linux BASH commands:

export
- Set an environment variable



Back to the Top

Simon Sheppard
SS64.com