Pushd, Popd, dirs

MATLAB implementation of unix-style pushd, popd, and dirs.

You are now following this Submission

pushd, popd, and dirs implement a unix-style directory stack. It uses a global variable to hold the stack.

Example usage:
> cd myDir
myDir> pushd( 'anotherDir' )
anotherDir> %excute commands here
anotherDir> dirs
myDir
anotherDir> popd
myDir> % back to where you started

Cite As

Dennis Jackson (2026). Pushd, Popd, dirs (https://www.mathworks.com/matlabcentral/fileexchange/4707-pushd-popd-dirs), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0