| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
| On this page… |
|---|
How MATLAB Helps You Manage Files Making Files Accessible to MATLAB |
MATLAB provides tools and functions to help you:
Find a file you want to view, change, or run
Organize your files
Ensure MATLAB can access a file so you can run or load it
MATLAB limits where it looks for files so it can locate them more quickly. To run or get help for an M-file, or to load a MAT-file, the file must be in one of these locations:
MATLAB current folder
A folder that is on the MATLAB search path
Similarly, files called by files you run also must be in one of these locations.
Special cases are:
Private, class, and package folders
When there are multiple files with the same name accessible to MATLAB
By default, files provided with MathWorks products are in folders on the search path. You do not have to do anything for MATLAB to access the files. These files are in matlabroot/toolbox. To determine the location of matlabroot, run the matlabroot function.
By default, the search path also includes a folder named MATLAB where you can store files that you and other users create. To determine the location of the MATLAB folder, run the userpath function.
To access files in any other location, either:
Make the folder containing the files be the current folder
Add the folders containing the files to the search path.
The Current Folder browser is a key tool for managing files.
Open the Current Folder browser by selecting Desktop > Current Folder from the MATLAB desktop.

Use the Current Folder browser to:
See the contents of the current folder.
View and change the current folder using the address bar.
Find files and folders using the search tool
.
Arrange information about files and folders using the View menu.
Change files and folders, such as renaming or moving them.
Run, open, get help for, and perform other actions on the selected file or folder by right-clicking and using the context menu.
Change the search path using the Set Path dialog box. To open it, select File > Set Path.
Find files and content within files across multiple folders using the Find Files tool. To open the tool, select Edit > Find Files.
View and change the current folder using the Current Folder field in the desktop toolbar.
Manage files programmatically using functions. See the function category, Workspace, Search Path, and File Operations.
For More Information See Managing Files in MATLAB in the MATLAB Desktop Tools and Development Environment documentation |
![]() | Workspace Browser and Variable Editor | Finding and Getting Files Created by Other Users — File Exchange | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |