This overview of the "Filters" section of Job Options applies to both GoodSync for Windows and GoodSync for Mac unless noted otherwise.
- Include All of
- Exclude All after Include
- Exclude empty folders
- Exclude Hidden files and folders
- Exclude System files and folders
- Exclude Temporary files and folders
- Copying and pasting Filters
- Adding Filters from the Context Menu after Analyze
- Filter syntax and parameters
Include All of (empty by default)
If not empty, files and folders whose names match an inclusion filter – and do not match any exclusion filters – are included in the synchronization.
Exclude All after Include (empty by default)
Files and folders that match an exclusion filter will be excluded from synchronization.
NOTE: By design, exclusions will take priority over inclusions.
Exclude empty folders (unchecked by default)
If checked, Exclude folders that are empty or contain only empty folders. Folders are considered empty if they contain no files or only files excluded by Filters.
Exclude Hidden files and folders (by default, checked in sync jobs, unchecked in backup jobs)
Exclude files and folders that have a "Hidden" attribute.
Exclude System files and folders (by default, checked in sync jobs, unchecked in backup jobs)
Exclude files and folders that have a "System" attribute.
Exclude Temporary files and folders (Windows only, checked by default)
Exclude temporary files and folders that are not worth saving.
Copying and pasting Filters
Use the "Copy All" and "Paste" buttons to copy and paste filters between the Include and Exclude sections as well as between the jobs.
Adding Filters from the Context Menu after Analyze
The easiest way to exclude or include a file or group of files is to perform an analysis and then right-click the file or folder and select one of the exclusion/inclusion commands:
- Exclude "/FolderName/FileName" file or folder: Exclude only this file or folder, as specified by its complete path "/FolderName/FileName".
- Exclude All "ItemName" files or folders: Exclude all files or folders (in any of the subfolders) that are named "ItemName".
- Exclude All "*.ext" files: Exclude all files that have the extension "ext", in all sub-folders.
-
Include Only "/FolderName/FileName" file or folder:
Include only this file or folder, as specified by its complete path "/FolderName/FileName". - Include Only "*.ext" files: Include all files that have the extension "ext", in all sub-folders.
These commands add a line to the list of exclusions/inclusions in "Jobs" >> "Options" >> "Filters."
Filter syntax and parameters
Wildcards
Wildcards are used in name filters to match patterns in file and folder names.
Supported wildcards
* Matches any sequence of characters (including none)
? Matches exactly one character
[a-z] Matches a single character within a range (e.g., a through z)
\c Matches the literal character “c”
Use this to escape special characters like *, ?, or [
/ Used as a folder separator when needed (do not use \ as a folder separator, even on Windows)
Examples
name *.txt
Matches all .txt files
name file?.log
Matches file1.log, fileA.log, etc. (any single character)
name *report*
Matches any file or folder containing “report”
name *.[a-z][a-z][a-z]
Matches files with a 3-letter extension (e.g., .txt, .log)
name \*backup\*
Matches names that literally contain “*backup*”
name \[Data\]
Matches files or folders named “[Data]”
Path filter (file or folder path)
A line that starts with "path /" (or just "/") matches the file or folder path (relative to the sync folder) to a specified wildcard or string.
Examples:
path /folder1/file2.ext
Matches a specific file by full path
path /Parent*
Matches all items where the top-level folder starts with "Parent"
path /[a-z0-9]*
Matches all items where the top-level folder starts with a–z or 0–9
path /\[Originals\]
Matches a folder named “[Originals]” at the top level (brackets must be removed)
NOTE: An Include filter "path /folder" includes only the /folder itself, but not the files inside. To include files inside this folder, write this clause as "path /folder/*".
name filename/foldername
A line that starts with "name" matches the file or folder name (last object of the path) to a specified wildcard or string.
Examples:
name *.xls
Matches all Excel files
name report
Matches files or folders containing "report" in the name
name *.???
Matches files with exactly a 3-character extension
name *.[a-z][a-z][a-z]
Matches files with a 3-letter extension (e.g., .txt, .log)
name file?.txt
Matches file1.txt, file2.txt, etc.
name \[Originals\] –
Matches files or folders named exactly “[Originals]”
(Brackets must be escaped with backslashes)
Size value
What “any” vs “all” means
any: is true on either side (left OR right)
all: is true on both sides (left AND right)
Lines that start with "any size" or "all size" allow exclusion/inclusion of files by file size:
any size<N
means size.left<N OR size.right<N
all size<N
means size.left<N AND size.right<N
any size>N
means size.left>N OR size.right>N
all size>N
means size.left>N AND size.right>N
any size=N
means size.left=N OR size.right=N
all size=N
means size.left=N AND size.right=N
any size!=N
means size.left!=N OR size.right!=N
all size!=N
means size.left!=N AND size.right!=N
any size>=N
means size.left>=N OR size.right>=N
all size>=N
means size.left>=N AND size.right>=N
any size<=N
means size.left<=N OR size.right<=N
all size<=N
means size.left<=N AND size.right<=N
any size[S1,S2]
means S1 <= size.left < S2 OR S1 <= size.right < S2
all size[S1,S2]
means S1 <= size.left < S2 AND S1 <= size.right < S2
K = kilobytes
M = megabytes
NOTE: No spaces are allowed in the size filter line. The entire expression must be entered as one continuous string.
Non-file items (folders, links, or missing/deleted files) are treated as having a size of 0.
This can affect results, especially when using filters like “<” or “<=”.
Examples:
all size>=100
Includes files that are 100 bytes or larger on both sides
any size<2K
Includes files smaller than 2 KB (2048 bytes) on either side
Note: folders and deleted items (size = 0) will also match this condition
all size=3M
Includes files that are exactly 3 MB (3,145,728 bytes) on both sides
any size>=50M
Includes files 50 MB or larger on either side (common use case)
any size[50M,72M]
Includes files between 50 MB and 72 MB (50M ≤ size < 72M)
Time value
What “any” vs “all” means
any: is true on either side (left OR right)
all: is true on both sides (left AND right)
Lines that start with "any time" or "all time" allow exclusion/inclusion of files by modification date:
any time<T
means time.left<T OR time.right<T
all time<T
means time.left<T AND time.right<T
any time>T
means time.left>T OR time.right>T
all time>T
means time.left>T AND time.right>T
any time=T
means time.left=T OR time.right=T
all time=T
means time.left=T AND time.right=T
any time!=T
means time.left!=T OR time.right!=T
all time!=T
means time.left!=T AND time.right!=T
any time>=T
means time.left>=T OR time.right>=T
all time>=T
means time.left>=T AND time.right>=T
any time<=T
means time.left<=T OR time.right<=T
all time<=T
means time.left<=T AND time.right<=T
any time[S1,S2]
means S1 <= time.left <= S2 OR S1 <= time.right <= S2
all time[S1,S2]
means S1 <= time.left <= S2 AND S1 <= time.right <= S2
Where T is a date in one of these formats:
- YYYY/MM/DD – year/month/day (specific date)
- -Nd – N days ago
- +Nd – N days in the future
- -Nh – N hours ago
- +Nh – N hours in the future
- -Nm – N minutes ago
- +Nm – N minutes in the future
NOTE: No spaces are allowed in the "time" match line. Any spaces will cause the filter to fail or be ignored.
Correct:
any time>=-7d
Incorrect:
any time >= -7d
Only existing files are evaluated in "time" filters. Deleted files are not included in time comparisons.
Non-file items (folders, links, or missing/deleted files) are treated as having a default timestamp of January 1, 1970 (NullTime). This can affect results when using strict comparisons.
Examples:
any time>=2008/7/4
Includes files modified on or after July 4, 2008 (on either side)
all time<-5d
Includes files where both sides are older than 5 days ago
any time>=-7d
Includes files modified within the last 7 days (most common use case)
any time[-30d,-7d]
Includes files modified between 7 and 30 days ago
any time>=+7d
Includes files modified 7 days in the future or later (rare use case)
is-x
Lines that start with "is" match file and folder attributes. These filters let you include or exclude items based on type or system attributes.
isfolder
Matches folders only
isfile
Matches files only
issymlink
Matches symbolic links or junctions
ishidden
Matches files and folders marked as hidden
issystem
Matches files and folders with the system attribute (Windows only)
isarchive
Matches files and folders with the archive attribute (Windows only)
isreadonly
Matches files and folders marked as read-only (Windows only)
isoffline
Matches files and folders with the offline attribute (Windows only)
iscompressed
Matches files and folders with the compressed attribute (Windows only)
isencrypted
Matches files and folders with EFS encryption (Windows only)
exist-x
Lines that start with "exist" match whether files or folders are present on the left and/or right side of the job. These are useful for detecting new, deleted, or one-sided items.
existboth
Includes only items present on both sides
existone
Includes items that exist only on one side (useful for detecting new or deleted files)
existany
Includes all items that exist on at least one side