Find Files
Find Files by Name
If you know the name of the file you want to find, begin typing the first
characters of the name in the Files panel. As you type, the Files panel searches
downward from the top of the window, looking through all expanded folders. To open
the Files panel, click the Files icon in the sidebar.
To search for files in the current folder or in the current project, go to the Home tab and click the Go to File button.
Find and Replace Text in Filenames and Content
To search for and replace text in filenames and file content, use the Find Files panel. To open the Find Files panel, click the Find Files icon in the sidebar. If the Find Files icon is not in the left or right sidebar, go to the Home tab, and in the File section, click Find Files. To open the Find Files panel in a separate window, click the Find Files actions button at the top of the Find Files panel and select Undock Find Files.
Change How to Search for Text
To change how the Find Files panel searches for text, modify the search options:
Match case – Click this button on to search only for text with the precise case of the search text.
Match whole word – Click this button on to search only for exact full-word matches.
Filters – Specify whether to search for file names or file content, what folders or files to search in, and what file types to include in the results. For example, in the Look in field, select
Editor - All open files
to only search in files open in the Editor, and in the File type field, enter*.m, *.mlx
to limit the search to MATLAB® program files.
Collapse, Clear, or Export Results
After performing a search, you can collapse or clear the list of search results, or export them as plain text.
Collapse or clear results – Click the Find Files actions button (
) at the top of the Find Files panel and select Collapse Results or Clear Results.
Export results as plain text files
.txt
) – Click the Find Files actions button () and select Export as Plain Text. The exported file can then be viewed in an external text editor.
Replace Text
To replace text in filenames and file content, click the expand button
to the left of the search field to open the
replace options. Then, to replace an instance of the search text in the results,
select the line containing the result, enter the text that you want to replace
the search text with, and click the Replace button. To
replace all instances of the search text, click the Replace
All button.
Replacing text is supported in text files (.txt
) and
MATLAB code files (.m
).