Folder Comparisons > Filters

This preference page allows you to create and apply filters for finer control over the folder comparison engine. In broad terms, there are two types of folder comparison filters:

  • Include/exclude filters. They determine which files and/or folders will be included in or excluded from comparison. Currently, DeltaWalker offers four such filters: Path, Date, Size and Attributes.
  • Alignment override filters. They allow matching/alignment of files and folders with different names from two adjacent panels e.g. first and second so that they can be compared.

Appearance

Folder comparison filters preference page

Filters at a glance

Folder comparison filters in DeltaWalker are an ordered collection of regular and/or shell expressions aimed at including/excluding or re-aligning files and/or folders during comparison. A single filter can contain one or more expressions separated using the default separator for each OS: colon (':') for Mac OS X and Linux, and semicolon (';') for Windows.

DeltaWalker currently offers five folder comparison filter types:

  • Path - exclude/include files and/or folders based on a shell or regular expression matching their name or path.
  • Date/Time - exclude/include files based on their date modified attribute. One can specify both absolute time, for instance a specific date & time, and relative time using a range of time units - from milliseconds to years. Relative time is always applied at the moment a filter is run. For instance, creating and applying a time filter to exclude files older than 2 hours will always be excluding files that are older by 2 hours counted from the time the filter is run.
  • Size - exclude/include files based on their size attribute.
  • Attribute - exclude/include files based on a their most commonly used attributes e.g. read-only, hidden, etc.
  • Alignment Override - allows files with different names to be matched for comparison based on a pair of shell/regular expressions.

The order of filters matters:

  • Exclusion filters have precedence over inclusion filters regardless of position i.e. when a folder is excluded its files and subfolders will not be included even if there's an inclusion filter for that.
  • The precedence of File filters is determined solely by their order, where the last filter has the highest precedence.

During a folder comparison by content, where individual text files are compared using a text comparison algorithm, both folder and text filters are at play: folder filters control which files will be included or excluded from comparison and text filters control how the individual text files will be compared.

Shell expressions

You can define your DeltaWalker folder filters using the simplest and the most common of file-system name matching techniques— shell expressions.

A shell expression behaves differently depending on the presence of a path separator (/ on OS X & Linux, \ on Windows) inside the path/shell expression being evaluated:

  • When there is no path separator, the shell expression is matched against file or folder names anywhere inside the selected hierarchies. For example, the expression bin will match any folder or file named bin e.g. work/project1/bin, work/project2/Debug/bin or work/bin, but will not match, for instance, files and folders named my_bin.
  • When there is a path separator, the expression will be matched against the path of the file/folder (path is relative to the root folder of the comparison). For example: my_files/documents will match only file or folder my_files/documents but will not match work/my_files/documents.

A shell expression can use the following special characters:

? matches any single character once.

* matches any character except separator zero or more times.

** matches any character zero or more times.

Examples:

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" e.g. 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; will not exclude work/my_files/documents.

Alignment override filters are described in a separate section.

See Also