Skip to Content

Folder Comparisons > Filters

Find it under Settings > New Comparisons > Folder Comparisons > Filters. The tab of an active folder comparison has the same page, for that comparison alone.

Use this page to create and apply filters that give you finer control over folder comparisons. There are two kinds of folder comparison filters:

  • Include and exclude filters, which decide which files and folders are included in or excluded from the comparison. There are four kinds: Path, Date/Time, Size and Attribute.
  • Alignment overrides, which match, or align, files and folders with different names on two sides of the comparison, such as the first and the second, so that they can be compared. They are available in DeltaWalker Classic Pro and Oro.

The table lists the filters with their Filter, Target and Action; check a filter to apply it, uncheck it to leave it out. Click New and choose the kind of filter to add one, and use Edit and Delete to change and remove the selected filter. Up and Down move the selected filter in the list, which matters because the order of the filters decides their precedence.

The page

The Filters page of the Settings window

Filters at a glance

Folder comparison filters are an ordered list of regular and shell expressions that include, exclude or re-align files and folders during a comparison. A filter can hold more than one expression, separated by the separator of the operating system: a colon (:) on macOS and Linux, a semicolon (;) on Windows.

There are five kinds of folder comparison filters:

  • Path - includes or excludes files and folders whose name or path matches a shell or regular expression.
  • Date/Time - includes or excludes files by their date modified. You can give an absolute time, such as a specific date and time, or a relative time, in units from milliseconds to years. A relative time is counted from the moment the filter is applied: a filter that excludes files older than 2 hours always excludes the files more than 2 hours older than the time it runs.
  • Size - includes or excludes files by their size.
  • Attribute - includes or excludes files by their most common attributes, such as read-only or hidden.
  • Alignment Override - matches files with different names for comparison, by a pair of shell or regular expressions. In DeltaWalker Classic Pro and Oro.

The order of filters matters:

  • Exclusion filters take precedence over inclusion filters wherever they are in the list: when a folder is excluded, its files and subfolders are not included, even if an inclusion filter matches them.
  • The precedence of filters that target files is decided solely by their order: the last filter has the highest precedence.

In a folder comparison by content, where text files are compared with the text comparison algorithm, both folder and text filters are at play: the folder filters decide which files are included in or excluded from the comparison, and the text filters decide how the text files are compared.

Shell expressions

You can write folder filters with the simplest and most common way of matching file names: shell expressions.

A shell expression behaves differently depending on whether it contains a path separator (/ on macOS and Linux, \ on Windows):

  • Without a path separator, the expression is matched against the names of files and folders anywhere in the selected hierarchies. For example, the expression bin matches any folder or file named bin, such as work/project1/bin, work/project2/Debug/bin or work/bin, but not files and folders named my_bin.
  • With a path separator, the expression is matched against the path of the file or folder, relative to the root folder of the comparison. For example, my_files/documents matches only the file or folder my_files/documents, not work/my_files/documents.

A shell expression can use the following special characters:

? matches any single character once.

* matches any characters except the path separator, zero or more times.

** matches any characters, including the path separator, zero or more times.

Examples

The examples separate expressions with semicolons, as on Windows; on macOS and Linux, use colons.

Expression

Target

Action

Effect

*

Files & Folders

Include

Includes all files and folders inside the selected folder hierarchies.

*

Folders

Include

Looks recursively inside the selected folder hierarchies.

bin

Folders

Exclude

Excludes all folders named bin.

*.c;*.cpp;*.cs;*.h;*.java;*.rc

Files

Include

Includes the specified source file types.

*.cab;*.dll;*.exe;*.idb;*.map;*.ncb;*.o;*.obj;*.pch

Files

Exclude

Excludes the specified binary file types.

**/Debug/**

Files & Folders

Exclude

Excludes files and folders inside all folders named Debug anywhere in the selected folder hierarchies.

sample?.txt

Files

Exclude

Excludes sample1.txt or sampleB.txt, but not, for instance, sample12.txt.

work/sample*.txt

Files

Exclude

Excludes work/sample1.txt or work/sample123.txt, but not sample1.txt or work/sample1.log.

**/image

Folders

Exclude

Excludes pictures/image or root/my documents/pictures/image, but not image (in root folder).

**doc**

Files & Folders

Include

Includes all resources whose name contains the substring "doc", such as work/project1/doc, work/project2/Debug/doc, work/doc and my_doc.

my_files/documents

Files & Folders

Exclude

Excludes resources named my_files/documents inside the root folder, but not work/my_files/documents.

Alignment overrides are described on the Alignment Overrides page.

See Also

Last updated on