File Exchange

image thumbnail

MCD - My change directory

version (2.69 KB) by Sky Sartorius
Very quickly switch to a recent or preferred directory - all from the command line.

1 Download

Updated 29 Mar 2017

View License

MCD displays in the command window a list of user-defined preferred directories (defined in a separate myCommonPaths.m file) as well as several recent locations used as the MATLAB current directory. The current directory is changed to the user's selection from the list.

Cite As

Sky Sartorius (2020). MCD - My change directory (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)


Exhaustive but compact help section, "see also" line, contact address, version history, comments in the code, error handling and the function is useful. Thanks for this nice submission.


Fixed help block; added ability to automatically add the path to the current file open in the editor to the list.

Added ability to skip the menu/prompt and got straight to a location, e.g. "mcd 1"; added ability to have a color-striped menu.

Split off list of preferred paths into a separate file so the primary function mcd.m file doesn't have to be touched by users.

Updated to handle new location of recent directories.

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux