Development Environment    

Viewing and Making Changes to Directories

The ways to view and make changes to directories are

Changing the Current Working Directory and Viewing Its Contents

To change the current directory, type the directory name in the pathname edit box in the Current Directory browser, and press the Enter or Return key. That directory becomes the current working directory and the files and subdirectories in it are listed.

To view a directory that has recently been displayed, click the down arrow at the right side of the pathname edit box in the Current Directory browser. The previously displayed directories are listed, sorted by most recent to least recent. Select an entry to view the contents of that directory. You can clear the list and set the number of directories saved in the list--see Preferences for the Current Directory Browser.

To view the contents of a subdirectory within the directory being displayed, double-click the subdirectory in the Current Directory browser, or select the subdirectory and press the Enter or Return key.

To move up one level in the directory structure, click the up button in the Current Directory browser toolbar, or press the Back Space key.

Function Alternative.   Use dir to view the contents of the current working directory or another specified directory.

Use what to see only the MATLAB related files in a directory. With no arguments, what displays the MATLAB related files in the current working directory. Use which to display the pathname for the specified function. Use exist to see if a directory or file exists. Use fileattrib to see or set file attributes, much like attrib in DOS or chmod in UNIX.

Adding Directories to the MATLAB Search Path

From the Current Directory browser, you can add directories to the MATLAB search path. Right-click and from the context menu, select Add to Path. Then select one of the options:

Changing the Display

To specify the types of files shown in the Current Directory browser, use View -> Current Directory Filter. For example, you can show only M-files. If All Files is selected and you want to see specific file types, first clear the selection for All Files and then select the specific file types.

You can sort the information shown in the Current Directory browser by column. Click the title of column on which you want to sort. The display is sorted, with the information in the that column shown in ascending order. Click a second time on the column title to sort the information in descending order.


  Current Directory Browser Creating, Renaming, Copying, and Removing Directories and Files