PUSHD

(from Push Directory)

Stores the current directory to use with the POPDPOPD command, then switches to the specified directory.

PUSHD [path | ..]

Where:

  • path - Specifies the directory to use as current.
  • .. - Specifies the parent directory as the current directory.

If a UNC network path is specified, a temporary network drive will be created and the current directory will be changed to the network drive.

Examples:

1. Store the current directory and switch to C:\yummy cabbages:

pushd C:\yummy cabbages

 

2. Save the current directory and move to the parent one:

pushd ..

 

3. Store the current directory, create a network drive for the path \\domain\network_dir, and switch to the network drive:

pushd \\domain\network_dir

Comments