Advanced sync filters let you define custom rules for synchronizing files and folders. With filters, you can exclude specific file types, prioritize or ignore entire folders, and customize your storage management with precision.
Important notice
Setting up sync filters requires advanced technical skills. They are managed through hidden configuration files rather than the Tresorit app interface. Incorrect configurations may result in permanent data loss. Proceed only if you are comfortable working with command-line tools and hidden system folders.
Synchronization logic
Synchronization runs recursively from the root of your main folder. Files and directories are processed separately, and each path is evaluated for its sync attributes. Attributes can only be checked if the parent directories are already synchronized - rule generation usually resolves these dependencies automatically. Any file or directory marked as Ignore or Junk is excluded from synchronization.
Advanced filter logic
Advanced filters are controlled by special files stored in the hidden .tresorit folder within each synchronized directory. These filter files do not appear in the Tresorit interface - they must be created manually.
Setting up filters
- Navigate to the hidden .tresorit folder inside your synchronized folder.
- Create a subfolder named Filters.
- Inside .tresorit/Filters, create the following files:
- roaming.filter – Applies to all users who sync the folder. It may contain default rules that apply to everyone.
- local.filter – Applies only to your current device and can override hardcoded rules.
⚠️ Ensure file and folder names exactly match those shown here, including letter case, as names are case-sensitive.
Creating custom filter rules
Filter syntax
Each line in a filter file defines a rule, except for comments and empty lines. Rules use the following format:
Lines starting with # or // are treated as comments (only when placed at the beginning of a line).
Attributes
Attributes determine how a specific path behaves during synchronization- whether it is synced, ignored, prioritized, or timestamped differently.
Values in bold and underlined format can be used standalone.
Common attributes
Sync
- Sync (default): sync the path
- Ignore: exclude path from sync
- Junk: exclude and eligible for deletion
Date settings
- Remote (default): use remote timestamps
- Local: use local timestamps
Threading
- Normal (default): use normal thread categories for syncing
- Priority: use a priority thread
Priority value
- (Default: 3) Accepts unsigned integers from 1 (highest) to 5 (lowest).
Path-matching attributes
PathType
- File: Apply the rule to files only
- Directory: Apply the rule to directories (and all their contents)
- Unspecified (default): Apply to both files and directories
CaseSensitive
- False (default): Path matching is case-insensitive
- True: Path matching is case-sensitive (use cautiously on case-insensitive systems)
Example
# is equivalent to
[Junk, File] ...
Default path attributes
By default, all files and folders follow these settings:
Path examples
Filter files use a straightforward syntax to define relative path patterns. The simplest approach is to list the full paths you want to include or exclude.
You can use the following wildcard characters in filter rules:
- # matches any subpath (any depth)
- // matches a single path component (anything except /)
⚠️ Always use forward slashes / in paths.
These patterns ensure that parent directories are correctly handled during recursive synchronization.
Basic rules
Exclude a specific file
Ignore all files
Sync all .config files across the folder
Selective sync (example)
[Sync] Foo/Bar
These two rules ignore all files and folders by default, then selectively sync only the Foo/Bar directory.
Advanced rules
Sync all direct subdirectories of Directory and all file.txt files within them
Sync all C directories inside directories matching A*B pattern under A directory
Ignore all Debug directories at any depth (similar to .gitignore)
Rule processing order
Sync rules are processed in the following order:
- Roaming filter
- Selective sync and mobile offline rules (which may override earlier ones)
- Hardcoded rules (e.g. ignoring most of the .tresorit directory and temporary files)
- Local filter
Hardcoded rules
Specific rules are permanently built into Tresorit and cannot be modified. They roughly correspond to this logic:
# Ignore temporary files, local.filter, and the Trash directory
[Ignore] .tresorit
# Sync the roaming.filter and the .tresorit/Filters directory, which is necessary
[Sync] .tresorit/Filters/roaming.filter
# Temp files that can be deleted if their containing folder gets deleted
[Junk] //desktop.ini
[Junk] //Thumbs.db
[Junk] //.DS_Store
[Junk] //.localized
[Junk] //.fcpcache
# In the line below, \r is a single character
[Junk] //Icon\r
[Junk] //~$*
[Junk] //.~*
[Junk] //._*
[Junk] //*.lock
[Junk] //*.tmp
[Junk] //*.onetmp
[Junk] //*.kate-swp
# Actually: "\.sb-[0-9a-f]{8}-[0-9a-zA-Z]{6}" (Mac specific sandbox temporary items)
[Junk] //*.sb-*
# Actually: "\.goutputstream-[0-9A-Z]{6}"
[Junk] //*.goutputstream-*
# Other temp files that should not be deleted even if their parent directory gets deleted
[Ignore] //.VolumeIcon.icns
[Ignore] //System Volume Information
[Ignore] //$RECYCLE.BIN
[Ignore] //.DocumentRevisions-V100
[Ignore] //.fseventsd
[Ignore] //.Spotlight-V100
[Ignore] //.TemporaryItems
[Ignore] //.Trashes
[Ignore] //.Trash-*
[Ignore] //*.lnk
[Ignore] //*.crdownload
[Ignore] //*.part_*