Searching in Directory Groups

From Appmethod Topics
Jump to: navigation, search

Go Up to How To Manage Files and Folders

You can create arbitrary directory groups and save them for use with the Search > Find in Files dialog box.

The Find in Files dialog box allows you to specify your search target using two entry fields:

  • File mask -- the file name to match. You can use wildcards such as my*.c??.
  • Directories -- the path or paths to search. This can be any of the following:
    • A single directory
    • A list of directories, separated by semicolons (;).
    • A named directory group (a list of commonly searched directories that you create and name).
In the Directories field in the Search > Find in Files dialog box, names of directory groups are prefixed with an at-sign (@), such as @MySearchDir.

To create and populate a directory group, and add it to Find in Files

  1. On the Find in Files dialog box, click FoldersAndGroups.bmp (Folders and Groups) located next to the Directories field.
  2. The Select Directories dialog box opens. Click New.bmp (New directory group).
  3. On the New Directory Group dialog box, enter a name for the directory group you are creating, and click OK. On the Select Directories dialog box, your directory group name now appears in the Group name field.
  4. In the Group contents field, enter directory names by doing either of the following:
    • Type a directory name into the entry field. Do not include a semicolon separator (;) between names; separators are automatically added when the directory group is created.
    • Click BrowseForFolder.bmp (Browse for folder), then browse for and select a folder, and click OK on the Browse for Folder dialog box.
  5. Repeat the previous step as many times as necessary to complete the directory group you want.
  6. Verify that the directory names in Group contents are valid: Click the associated button DeleteInvalidPaths.bmp (Remove Invalid Paths) to remove all invalid directory names.
  7. Click UpArrow.bmp (Add group to directory list) to move the contents of the directory group up to the Directories to search field (the upper pane of the Select Directories dialog box).
  8. Verify that the directory list in Directories to search is valid and contains only directories you want to include in the search:
    • To validate directories, click the associated button DeleteInvalidPaths.bmp (Remove invalid paths).
    • To delete any directory or directory group, click DeleteDirectoryGroup.bmp (Delete directory group).
  9. To add all the directories and directory groups listed in Directories to search to the Find in Files dialog box, click OK.

See Also