| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
| On this page… |
|---|
MATLAB functions and desktop tools help you:
Find a file you want to open, edit, load, or run in MATLAB
Organize your files
Obtain information about the contents and status of a file
Ensure that MATLAB can access a file so that you can run or load it. Typically, any file you access must be in the current folder or in a folder that is on the MATLAB search path.
For a broad introduction, see the Managing Files in MATLAB topic in the MATLAB Getting Started guide.
You can create, open, close, read, write, rename, move, and delete files and folders using MATLAB functions. For a listing of them and links to their reference pages, see File Operations.
MATLAB also provides many interactive tools for working with files. Click the name of a tool in the following table to learn more about it.
Desktop Tool | Description |
|---|---|
View files, perform file operations such as opening, finding files and viewing file content, and managing and tuning your files. | |
Locate files by folder, file type, size, text within them, and other criteria. | |
View line-by-line differences between two files. | |
Create, edit, debug, and analyze files containing MATLAB language statements (functions and scripts), and view and edit other text files. | |
Access a repository of files, created by users for sharing with other users, at the MathWorks Web site. |
To view and change the current folder:
View the full path to the current folder in the address bar.
If the full path does not fit in the address bar, hover over the folder icon to see it.
To view the full path as a string, suitable for copying or pasting, click the empty area near the right edge of the address bar.
View subfolders and change the current folder using the address bar. For more information, right-click the address bar, and from the context menu, select Help Using Address Bar.
Make a subfolder become the current folder by right-clicking the subfolder and selecting Open from the context menu.

To view or change the current folder on the desktop toolbar, use the current folder field. For example, select a previously used current folder from the history.
![]()
Use the pwd or the cd function to identify the current folder. Use the cd function to change it.
To specify the current folder programmatically when MATLAB starts, see Startup Folder for the MATLAB Program.
![]() | Managing Files in MATLAB | Understanding File Locations in MATLAB | ![]() |

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