Home > Commands N-Z > Commands P

PUSHD


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

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


Syntax

PUSHD /?

PUSHD path


Parameters
path (NT3.5)
The folder to make 'current' (UNC names accepted).

Switches
/? (NTXP)
Displays help.

Related

CD
PROMPT - Display the level of the PUSHD stack.
Equivalent Linux BASH commands:
export - Set an environment variable.


Notes

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.


Examples
    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>

Errorlevels

none.


Availability
Internal
DOS
none
Windows
none
Windows NT
NT3.5 NT4 NT2000 NTXP NT2003