Find Files and Folders - Desktop Search Engine Using Search Queries That Can Express Even the Most Complex Find Request.

Act On File Windows Compatibility Seals

This section discusses the Find Files and Folders functionality of the Locator module.
The Find Files and Folders functionality is a powerful desktop search engine used to find files and folders located on the local or network drives. To find files and folders using the Find Files and Folders functionality, the user creates Find Operands which are then used in search queries. Every Find Operand has a type, name and, in most cases, data. The type of the Find Operand determines what property it represents and will be used to match, for example the type of the Find Operands could be filename, extension, content, image, stream, meta-property (e.g. author of a document), etc. Depending on the type of the Find Operand, the user enters appropriate data which will be used in the search. For example if the search object is of type size, then the data that is entered is an integer number. The name of the Find Operands uniquely identifies it among the other Find Operands. Once created, the Find Operands can be used for multiple searches until they are deleted. To make a search, the user uses one or more Find Operands in a search query which expresses what is to be searched for. The search query is a simple logical expression constructed from logical operands and the logical operators AND, OR, XOR and NOT. The Find Operands are translated to logical operands using suitable relational operators applied to them, where the respective property of any tested file or folder is compared to the find operand. For example, let size1 be the name of a Find Operand of type "size" and have data 1000, and let size2 be another Find Operand of type "size" but has data 2000. Then a search query such as [>size1] & [<size2] can be used to find all items from the selected which have a size between 1000 and 2000. This methodology allows easy but powerful and flexible searches for all possible/known properties of files and folders.
Capture: Find Files and Folders
Find Files and Folders

Operation

To make a search simply follow these steps:
  1. Select the files and folders to be examined for matches in the selection view;
  2. Create any necessary Find Operands, if the existing ones are not suitable;
  3. Enter the search query and adjust the search controls;
Finally click the Find button to start the search. While processing, search information is displayed in a text window for information purposes only. Later all information is available in the Find Results view.

Controls

  
Selection Controls
Find Files and Folders Selection Controls
These controls are used to select and display the files and folders for the operation. In addition to the Add Files, Add Folders and Remove buttons, you can use the standard clipboard, drag and drop, and keyboard operations.
ShortcutsSelect the behavior of the functionality in respect to any shortcuts that might be present in the selected folders.
TargetAny shortcut located in selected folder will be dereferenced and its target file or folder will be treated as if it were selected.
ShortcutAny shortcut located in selected folder will be considered as a generic file and be tested if it is a match.
Target and ShortcutAny shortcut located in selected folder will be dereferenced and its target file or folder will be treated as if it were selected. The shortcut itself will be also considered as a generic file and be tested if it is a match.
IgnoreAny shortcut located in selected folder will be ignored.
Search inside of archivesAn archive is a generic file that is always tested if it is a match. Set this checkbox to request the module to also look inside of archives for matches. Clear this checkbox to test the archive file only and not look inside of it for matches.
Do not search in subfolders of selected foldersSet this checkbox to avoid looking for matches in the nested subfolders of any selected folders. Clear this to search through the entire directory tree of any selected folder.
Operation Controls
Find Files and Folders Operation Controls
These controls are used add, edit and delete find operands, enter search queries, and control the Find Files and Folders process.
Find Operands Find Operands are objects which represent one particular property of a file or folder. The Find Operands are created by the user and remain until such a time as they are deleted by the user. Find Operands have Name, Type and Property and/or Data, and may also have additional settings. For example, if a Find Operand is intended to represent file size, then it would be logical to call it, say, "size1". It must be assigned the type: "size", and given the particular file size in which we are interested, say, 1,000,000. Find Operands are used in search queries. A Search Query is a logical expression which asserts the set of properties that a file or a folder must own in order to be a match. When a search query is "true" for a particular file or folder, then that file or folder is a match.

Find Operands have the following properties:
  • Name - the name of the Find Operands are not case sensitive and must meet the following requirements:
    • must be unique among all currently existing Find Operands;
    • must be from 1 to 32 characters long;
    • must use only symbols from the following ranges: a-z, A-Z, 0-9, and '_' (underscore).
  • Type - the type of the Find Operand determines what property of file or folder will be represented by, and compared to this find operand. The possible types of objects are:
    • File or Folder Name - represents part or full filename, use to search for files and folders with a matching name.
    • Target - represent a file or a folder, use this type of find operands to filter for files or folders.
    • Text/Content - represents text in a file, use to search the content of files for a matching text string.
    • Data/Content - represents binary data, use to search the content of files for binary data.
    • Image - represents a property of an image, use to search for images with a particular property.
    • Stream (Audio/Video/Other) - represents a property of a stream, use to search for audio, video, or any other type of recognized stream.
    • Meta Data - represents a meta-property, for example author of a document, company owning the document, word count, etc. Use to search for a meta-property of a file which has embedded meta properties.
    • File Or Folder Size - represents size, use to search for a particular size of file or folder.
    • File Or Folder Date and Time - represents generic date and time, which are the times created, last modified and last accessed. Use to search for generic file/folder date and time.
    • File Or Folder Date - represents generic date, which is only the date portion of the times created, last modified and last accessed. Use to search for generic file/folder dates.
    • File Or Folder Time - represents generic time, which is only the time portion of the times created, last modified and last accessed. Use to search for generic file/folder times.
    • Attribute - represents a generic file attribute, use to search for generic file/folder attribute.
  • Property - depending on the type of the operand, these are the possible searchable properties. For example, if the search type is an image, a searchable property may be width.
  • Data - depending on the type of the operand and the selected property, there may also be a data entry. For example, if the search type is an image and the selected property is width then the data will be a positive number.
Add NewUse this action to create a new Find Operand using the Create New Find Operand dialog.
Capture: Create New Find Operand dialog
Find Files and Folders Create New Find Operand
EditSelect the find operand that you want to amend and use this action to invoke the Edit Find Operand dialog on it.
Capture: Edit Find Operand dialog
Find Files and Folders Edit Find Operand
DuplicateUse this action to duplicate a find operand with similar properties to a new find operand that you need, then edit the replica to match your new requirements.
DeleteUse this action to delete find operands that you no longer need. The action will give you a choice to permanently delete the selected find operands or only remove them temporary from the list to help readability when too many find operands clutter the view.
Search Query (Find What)Enter the search query in this textbox.

Let us consider a search query in which we want to find all files which have two particular properties, and does not have a third property. An example search query translated into plain English sounds something like:
"Find all files for which: property-A, AND property-B are TRUE but property-C is NOT TRUE."

Search Queries are logical expressions constructed by Boolean Operands (true/false variables) and Logical Operators (AND, OR, etc). Clearly Find Operands cannot be used in search queries just as they are because they merely represent a desired property of a file or a folder. Instead, Find Operands are compared to the particular property that they represent for every file or folder that is examined. The results of these comparisons for each file or folder are computed as the search query instructs to confirm or deny that the item is a match. Thus, the Find Operands are used to first define Find Units. A Find Unit always consists of an implied (and omitted) current file/folder to test on the left hand side, a relational operator (e.g. =, <, >, etc.) and a Find Operand on the right hand side, and is always surrounded by square brackets, e.g. [=size1]. To avoid confusion, the tested file or folder is always considered to be on the left hand side of the relational operator while the Find Operand is always on the right, i.e. [***tested file or folder***=size1], but since the tested file or folder is implied, it is entirely omitted to maintain clarity.

For example, as before, let size1 be the name of a Find Operand of type "size" and have data 1000, then a Find Unit might look like [>size1], [<size1], [=size1], etc. or if DocumentAuthorJoeDoe is the name of a meta-data Find Operand representing the author of a document then a Find Unit may look like [=DocumentAuthorJoeDoe] and will be used to compare the authors of all selected documents with the name entered in the DocumentAuthorJoeDoe Find Operand. The recognized relational operators in Find Units are:

SymbolNameExampleMeaning
= equal [=name1] true if the file property matches the find operand property and/or data
! not equal [!name1] true if the file property does not match the find operand property and/or data
< less than [<name1] true if the file property is less than the find operand property and/or data
> greater than [>name1] true if the file property is greater than the find operand property and/or data
<= less than or equal to [<=name1] true if the file property is less than or equal to the find operand property and/or data
>= greater than or equal to [>=name1] true if the file property is greater than or equal to the find operand property and/or data

Note that not any relational operators can be used on any find operand type, they must be compatible. For example "<" cannot be used when comparing text, but "=" can be used when searching for text and numeric data.

The simplest search query then might look like "[=name1]" where name1 is the name of a find operand searching for some property which can be compared using the = operator. To create more complex queries you can use rounded brackets and the following logical operators:

SymbolNameTypeExampleResult
& AND binary operator [>size1] & [=name1] true if both operands are true
+ OR binary operator [>size1] + [=name1] true if at least one of the operands is true
^ XOR binary operator [>size1] ^ [=name1] true if the operands are different
~ NOT unary operator ~([>size1] & [=name1]) true if the operand is false

Thus using find operands with appropriate type and data sets, coupled with relational operators and joined with logical operators and rounded brackets, one can easily express from the simplest to the even the most complex search query.
Accept item when property cannot be evaluatedThere are cases when properties on a particular file cannot be evaluated for some reason, e.g. because the property is simply missing for that file. Set this checkbox to assume that the property is a match if it cannot be evaluated. Clear this checkbox to ignore items for which a property cannot be evaluated.
Window Controls
Find Files and Folders Window Controls
These controls have generic meanings.
On TopSets and clears the Always On Top flag on the window. This checkbox adds or removes the window from the group of Top-most windows.
FindStarts the find process.

Example

In this example we will find all (a) files with (b) size bigger than 1 MB, which (c) have a ".pdb" extension.
  1. Select the folders in which to search. You can select whole drives.
  2. Create a Find Operator to be used to match the file sizes with the following attributes:
    • Name - size1MB
    • Type - File or Folder Size
    • Property - Size
    • Size - 1048576
  3. Create a Find Operator to be used to match the extensions with the following attributes:
    • Name - ext_pdb
    • Type - File or Folder Name
    • Property - Extension
    • Extension - pdb
    • Request Type - Plain Text
  4. Create a Find Operator to be used to match the File System Object Type with the following attributes:
    • Name - fso_file
    • Type - Target
    • Property - File
    • Match - True
  5. Enter the following search query: [>=size_1MB] & [=ext_pdb] & [=fso_file]
  6. Select the "Target and Shortcut" from the Use Shortcuts combo box.
  7. Set the "Search inside of archives" checkbox.
  8. Clear the "Accept item when property cannot be evaluated" checkbox.
  9. Clear the "Do not search in subfolders of selected folders" checkbox.
  10. Start the find operation by clicking the Find button.
Capture: Results from the exercise
Find Files and Folders Example