Filename Filters

A filename filter is a pattern, like *.*, *.DOC, or FILE??10.DAT, that you can use to tell dtSearch which files you want it to search or index in a directory.  For example, if you have a directory of word processing files, and want to search all of the files beginning with SMITH and having the extension DOC, you would use the filter SMITH*.DOC. 

A "?" matches any single character, so SMITH?.DOC would match SMITH1.DOC, but not SMITH123.DOC. An asterisk ("*") in a file name filter matches any number of characters, so SMITH*.DOC would match SMITH001.DOC, SMITHAAA.DOC, etc. 

To use more than one filter, just list the filters, separated by spaces.  Example:

SMITH*.DOC JONES*.DOC *.DAT

"Exclude" filters work the same as ordinary filters.  They just specify files that you do not want to include. 

Spaces in Filters

If a filename filter contains a space, it must be quoted to make it clear that the space is part of the filter and not a delimiter between two filters.  Examples:

"*\Sample Folder\*"

"*Sample name*.doc"

Folder Names

If a filename filter contains a \ character or /, it is matched against the entire name of the document, including the folder it is in.  A filename filter that does not contain a / or \ is matched against the filename without the path.  Example:

*\Example\*

would match any file in a folder named "Example".

*Example*

would only match if "Example" was part of the filename, not including the path.

The same rule applies to web addresses indexed by the Spider, so if you add */NotThisFolder/* to your Exclude Filters, it would skip anything under https://www.example.com/NotThisFolder.

ZIP Archives

Inside ZIP archives, exclude filters apply in the same way that they apply to other files.    For example, if you exclude *.XLS, then sample.xls inside sample.zip would be skipped.  

Include filters only apply inside a ZIP archive if they have a special format that indicates that they are supposed to apply to zipped files.  Otherwise, all files inside a ZIP are assumed to be included.  The format for include filters inside a ZIP is:

*.ZIP>*.DOC *.ZIP>*.XLS *.ZIP>*.PDF

This filter would include only files named *.DOC, *.XLS, and *.PDF that are inside a ZIP archive.  To specify that items inside nested ZIP archives should also be indexed, the include filter would be:

*.ZIP>*.DOC *.ZIP>*.XLS *.ZIP>*.PDF *.ZIP>*.ZIP