Filters
You can add filters where your can configure to include or exclude files and folders based on file type, name, size, file age and modification date. Regular expression filtering is also supported if that is something you are into. Sync filters are specific to the folderPair for which you configure them.
Concept
- A file/folder will be always excluded if it matches at least one exclude filter.
- A file/folder will be included if it matches at least one include filter, it doesn’t have to match all of them.
- If a folder, other than the root folderPair sync folder, is excluded then all of its children file/folders will also automatically be excluded.
- Sub folders of an included folder will not be synced unless they also match a folder include filter.
Exclude filter precedence
If a file or folder matches both an exclude and an include filter, the exclude filter will take precedence and the file/folder will be excluded.
About filter values
- Filter value that is a path should match the relative path in relation to the selected folderPair folder.
- All filters are case-insensitive.
- File extension filters can be for example “jpg” or “doc”. Don’t include leading period.
- If filter value for the folder filters “contains”, “equals”, “startsWith” and “endsWith” contains a forward slash “/” then the filter is applied as a relative path in regards to the folder synced, if not is is compared against folder name only.
Regarding Windows file paths
Windows paths will, in regards to filter comparison, use forward slash "/" as path separator for cross-filesystem compatibility. This means a filter value of for example "/some/folder/" for a folder filter will match a windows path like c:\folderPairFolder\some\folder where c:\folderPairFolder is the configured folderPair folder. Do not use backslash as path separator in a filter.
When using the folder selector function on filter dialog it will convert selected Windows paths to use forward slash.
Regular expression filters
Regex filters are only applied to filename or foldername, not the relative path.
Info about what regex expressions are supported can be found here.
Examples - include filters
Desired outcome | Include filter to use | Value |
---|---|---|
Include a file abc.txt | File name equals |
abc.txt |
Include all files of type avi | File extension |
avi |
Include a specific folder xyz and all its sub folders | Folder name starts with |
/xyz/ |
Include a specific folder xyz and all files in it, but not subfolders | Folder name equals |
/xyz/ |
Include any folder named xyz and all files in those, but not subfolders | Folder name equals |
xyz |
Examples - exclude filters
Desired outcome | Exclude filter to use | Value |
---|---|---|
Exclude a file abc.txt | File name equals |
abc.txt |
Exclude all files of type avi | File extension |
avi |
Exclude a specific folder xyz and all its contents | Folder name starts with |
/xyz/ |