Home » Products » UltraEdit/UEStudio » Menu Commands (UE) » Search

Find in Files command

This command displays a dialog box for searching for a text string in files on a disk.

 

 

The string to search for is specified in the Find What [1] field.  A single or multi-line string up to 20,000 bytes may be used.  The files to search are specified in the In Files/Types [2] and Directory [3] fields.  The directory field specifies the directory to search and the In Files/Types field specifies the filename or types.  The filename may contain wildcards and may also contain multiple file types separated by semicolons, i.e.:

 

*. cpp;*.h

 

The Directory [3] field may contain multiple search paths separated by semicolons, i.e.:

 

C:mydir1; c:mydir2

 

Please note: If the Find [1] string is left blank the editor will return a list of all filenames that match the specified criteria.  This can be useful in generating a directory listing.

 

When the find is executed, the existing output is cleared if the output is being sent to the output window.  If being sent to an edit window, a new file is created if one does not already exists with the Find Results title.  If it does exist, the results are appended to the end of the existing file.

 

If the button is pressed the find history is displayed.

 

If the button is pressed a submenu with the following options are presented:

 

Add to Favorites

adds current item in combobox to Favorites list

Edit Favorites

presents Edit Find/Replace Favorites dialog where users can name favorite search strings, organize the list and remove items from the list

Favorites

presents submenu displaying the Favorites list.  Strings may be selected from the list to populate the combobox

 

If the button is pressed a list of regular expression options appropriate to the selected Regular Expression Engine is displayed.  This button is subdued unless the Regular Expressions checkbox is selected.

 

A search may be limited to file groups as follows:

 

Search In [5]:

 

Files Listed - This will search the files listed in In Files/Types and Directory fields (default selection).

Open Files - This will search all open files.  The In Files/Types and Directory fields  will be ignored.

Favorite Files - This will search all files listed under Favorite Files in the File menu.  The In Files/Types and Directory fields  will be ignored.

Project Files - This will search all files within the open project.  The In Files/Types and Directory fields will be ignored.

Solution Files - This will search all files within the open solution.  The In Files/Types and Directory fields will be ignored.

*Solution Files option only supported in UEStudio.

 

The following search options [4] exist:

 

Match Whole Word Only

By default, the search will not be restricted to matching whole words only. This option allows the search to be restricted to whole words only. This is useful for searching for ' a ', or 'A' without finding all words including 'a'. If a search has already occurred in a document, the default selection will match the previous search.

 

Match Case

By default, the search will not be case sensitive. The option to make the search case sensitive is given.  This option also affects regular expressions.  If this is not checked, [A-Za-z] and [A-Z] are equal to [a-z].

 

Results to Edit Window

This option instructs UltraEdit to create an edit window (new file) for the results of the find.  This allows editing of the results, saving or printing the results.  The default action is to capture the output in a list box window (Output Window) that allows the user to double click on the result and have the file opened automatically.

 

Regular Expressions

If this option is selected the search will be executed using the regular expression type selected under the Advanced section.

 

Advanced Options [6]

Pressing the Advanced button extends the Find in Files dialog to display additional search options.

 

Regular Expressions

Perl Compatible Regular Expressions

If this option is selected the editor will use Perl style regular expressions based on the Boost C++ Libraries.

 

UltraEdit Style Regular Expressions

If this option is selected the editor will use UltraEdit style regular expressions.

 

UNIX Style Regular Expressions

If this option is selected the editor will use UNIX style regular expressions.

 

For information regarding creation of regular expressions see Regular Expressions or Perl Regular Expressions help.

 

Search Subdirectories

By default, only files specified in the specified directory are searched.  This instructs the search to search all subdirectories of the specified directory.  If the Ignore hidden subdirectories option is selected, then subdirectories which are hidden (as defined in Microsoft Explorer) will not be included in the search.  

 

If desired, the user may exclude subdirectories by specifying them in the Subdirectories to ignore in search field.  Multiple names should be separated by a semicolon.  Users may also specify file names or extensions which should be ignored in the search in the File names/extensions to ignore in search field.  For example: "*.cpp;index.*;" would instruct the search not to match files with a "*.cpp" extension or files that are named "index" (regardless of extension).

 

Match Files if string is not found

This option instructs UltraEdit to list only files that DO NOT include the specified search string.

 

Display lines that do not match

This option instructs UltraEdit to list each individual line that does not match the search parameters.  Whereas Match Files if strings is not found only lists files that do not include the specified search string, this option returns data on a line-by-line basis.

 

Use Encoding

By default this option is disabled.  When the checkbox is selected, the dropdown may be used to specify the encoding to be used when searching for the specified string.  

 

Open matching files

If this option is selected, any files matching the specified parameters will be opened when the search completes.

 

Attachments
There are no attachments for this article.
Related Articles
Word Count command
Viewed 4463 times since Thu, Oct 13, 2011
Find Next command
Viewed 1907 times since Thu, Oct 13, 2011
Select to matching brace command
Viewed 2114 times since Thu, Oct 13, 2011
Toggle Bookmark command
Viewed 2204 times since Thu, Oct 13, 2011
Incremental Search
Viewed 1806 times since Thu, Oct 13, 2011
Save Bookmarks
Viewed 2202 times since Thu, Oct 20, 2011
Replace command
Viewed 12832 times since Thu, Oct 13, 2011
Search menu
Viewed 2034 times since Thu, Oct 13, 2011
Find Prev command
Viewed 1007 times since Thu, Oct 13, 2011
Replace in Files command
Viewed 1655 times since Thu, Oct 13, 2011