popd

Windows CMD · Directories · reference only

What it does

Returns to the directory saved by the last pushd and removes it from the stack; if it was a temporary network drive, it releases it.

Syntax

popd

Options and parameters

  • (sin argumentos)

    Returns to the last directory saved on the stack.

  • /?

    Shows the command's help.

Usage examples

  • pushd C:\Windows & popd

    Enters C:\Windows and goes back to where you were.

  • pushd \\servidor\compartido

    Creates a temporary drive for the network resource.

  • popd

    Returns and releases the temporary drive.

Notes and common mistakes

  • If the stack is empty, popd does nothing.
  • It works with pushd: always use both in the same script.

Related commands