Desktop Tools and Development Environment |
Finding Files and Content Within Files
Use the Find Files tool to search for files or for specified text within files.
To search for files in one or more directories, or to search for specified text in files, follow these instructions:
*
) in the filename. For example, type coll*
to search for filenames that start with coll
.
plot
. Do not use a wildcard character in this field, but instead specify a wildcard search using the Advanced Options Search type (see step 4). Alternatively, you can select text in the Command Window or Editor/Debugger and that text appears in the Find files containing text field.
;
). Or select the Browse
option at the end of the list box. To include subdirectories in the search, select the Include subdirectories check box.
*.m
in the In file type field to limit the search to M-files only. The default, *
, searches all file types.
By default, a text search looks for partial matches (the Contains text
option for Search type). You can instead select Matches whole word
.
You can open any M-files that appear in the results list by doing one of the following:
The M-files open in the Editor/Debugger. For text searches, the file opens scrolled to the line number shown in the results section of the Find Files dialog box. Once in the Editor/Debugger, you can use the Find & Replace tool to replace specified text.
To see the results of a previous search, select its tab at the bottom of the results pane. Find Files shows up 10 search result tabs while the tool is open, but does not maintain the results after you close the tool.
Function Alternative. Use lookfor
to search for the specified text in the first line of help for all M-files on the search path.
Opening and Running Files | Accessing Source Control Features |
© 1994-2005 The MathWorks, Inc.