TITLE=Search terms STYLES=ul li { margin: 4pt 0 4pt 0; } CONTENT=
Basiclly, if you want to find files containing, say, "bar" (e.g. files "foobar", "barbox" and "foobarbox"), you just need to type "bar" to $DLGNAME_NAMED@M$ field and press $DLGMAIN_FINDNOW@M$ button or hit Enter. However, more advanced searching terms than that can be used and the behaviour of these terms can also be widely altered using check boxes in $STRADVANCED_TABCAPTION@A$ tab and options in Advanced settings. In this page we try to clarify the meaning of all these possible search terms and options.
From now on we mean by "by default" the state after clean installation, i.e., when $DLGADVANCED_MATCHWHOLENAME@M$, $DLGADVANCED_USEWHOLEPATH@M$ and $DLGADVANCED_REPLACESPACES@M$ check boxes in $STRADVANCED_TABCAPTION@A$ tab are unchecked.
You can use question mark '?' and asterisk '*' in the same way as in DOS like command prompt to mean an arbitrary character or a group of arbitrary characters, respectively. For example, "foo?bar" find files, say, "foo1bar", "fooabar" but not "foobar" or "foo11bar". Furthermore, "foo*bar" find any files containing "foo" followed by "bar".
You can also specify an extension. For example, you can type "*.txt" to find text files. In this case do not specify extensions in $DLGNAME_EXTENSIONS@M$ field, otherwise files like "foo.txt.txt" are found only.
By default, Locate32 find files that contain the given search term. For example, "foobar" works as "*foobar*" (you can actually see this in the title bar). If you want to find files which names are exactly the given text, you can enable $DLGADVANCED_MATCHWHOLENAME@M$ check box in $STRADVANCED_TABCAPTION@A$ tab.
Some exceptions to the above:
If $DLGADVANCED_USEWHOLEPATH@M$ check box is checked, the given search term is compared to the whole path (not just to file name part). For example, "*foo*bar*" finds a file "C:\foo\bar.txt".
If $DLGADVANCED_REPLACESPACES@M$ check box is selected, spaces replaced with asterisks '*' before the given search term is parsed.
You can also specify several searching terms. For example, for example "foo,bar" finds files that contains foo or bar (or foo and bar, see below). The possible separators are shown in the table below. If you want to search files which name has these character, use apostrophes (e.g., type "foo,bar","cat*dog").
| Separator | Special notes |
| , | |
| ; | |
| (space) | Only if $STRADVANCEDSETTINGS_SPACEISSEPARATOR@C$ option in Advanced settings is enabled |
| | | If $STRADVANCEDSETTINGS_ANDMODEALWAYS@C$ is enabled, switches also to OR mode |
By default Locate32 find files which names contain any of the given search terms (OR mode). If you want to find files which names contain all of the given search terms (AND mode), you can enable $STRADVANCEDSETTINGS_ANDMODEALWAYS@C$ option in Advanced settings.
You can also use logical operations + and - if you enable $STRADVANCEDSETTINGS_ENABLELOGICALOPERATIONS@Cp$ option in Advanced settings. For example, if you want search files which names contain "foo" and "bar" (but not necessarily in that order", you can type "+foo,+bar". If you want to search files, which names do not contain "foo" but contain "bar", type "-foo","+bar". To find files which name contains + or -, you can use apostrophe (e.g., type: +"-foo",+"+bar").
The used mode is determined as follows:
You can use PERL compatible regular expression. For example, you can search files which contain "foo" or "bar", type: ":foo|bar" (':' at the beginning tells that the given string is a regular expression). If you want to compare the regular expression to the whole path (instead of just the file name), type "::foo|bar".
Regular expressions are implemented by using PCRE library. An introduction to PERL regular expressions is here.