Mastering Sync Filters
To give you full control over your data, the SyncFolder app allows you to define specific rules to include or exclude files and directories. Whether you want to skip temporary system files or only sync specific document types, the app's filtering system has you covered.
How It Works
The app uses globbing patterns, a flexible way to specify paths using wildcards.
- Excluded filters: if a file matches any of these patterns, it will be skipped during the sync process.
- Included filters (optional): if defined, only files matching these patterns will be processed. Note: if you also configure excluded filters, these take precedence over included filters.
Understanding the Syntax
The filter engine supports the following wildcards:
| Wildcard | Description |
|---|---|
* | Matches 0 or any number of characters within a single folder level. |
** | Matches 0 or any number of characters across multiple directory levels (recursive). |
? | Matches exactly one character. |
/ | Used to separate directories. Patterns are relative to your sync root. |
Common Examples
1. Filtering by File Extension To exclude all files of a certain type:
*.tmp— excludes all temporary files in the root folder.**/*.log— excludes all log files in the root and all subfolders.
2. Filtering Specific Folders To prevent entire directories from syncing:
bin/— excludes the "bin" folder in the root directory.**/node_modules/**— excludes all files and subdirectories inside any "node_modules" folder, no matter how deep it is in your folder tree. It doesn't exclude thenode_modulesfolder itself — only its contents.**/node_modules— excludes all "node_modules" folders in the tree, including the folders themselves.
3. Filtering Specific Files To exclude (or include) certain files:
desktop.ini— excludes thedesktop.inifile in the root directory.**/appsettings.json— excludes allappsettings.jsonfiles inside any folder.**/temp/**— excludes all files in anytempfolder in the tree.
4. Pattern Matching
image?.jpg— matchesimage1.jpgorimageA.jpg, but notimage12.jpg.Project [0-9]/**— matches any folder starting with "Project" followed by a single digit.**/*backup*— matches any file with "backup" in its name, likefile_backup.txtorbackup.sql.
Quick Cheat Sheet
| Goal | Pattern Example |
|---|---|
Exclude all .git folders | **/.git/** |
| Exclude hidden files (Android/iOS) | **/.* |
| Sync only PDF files | **/*.pdf |
| Exclude a specific subfolder | Archive/2023/** |
Case sensitivity. Filters are not case-sensitive. *.JPG and *.jpg are treated the same way.
Relative paths. All patterns are relative to the root folder you have selected for synchronization. Do not use absolute paths like /storage/emulated/0/DCIM/....
Best Practices
- Start broad, then refine: if you want to exclude all backups, use
**/*.bak. - Check your slashes: use the forward slash
/as a directory separator for consistency, even on Windows. - Test with small sets: when setting up complex inclusion rules, run a test sync with a small folder first to ensure your patterns are capturing the intended files.
Related topics: Advanced Task Settings · Mobile Sync Server