How to exclude files from sync in Koofr
Are you syncing a lot of your files, but need to exclude certain files from being synchronised to your Koofr account or ignore certain filetypes? Easy - set some advanced syncing rules with the help of this guide.
Written by human for humans
Are you syncing lots of files into your Koofr account? Do you sometimes want to exclude some of them from syncing or ignore a certain file type for whatever reason? You can simply do that with a .syncignore file you create in the root of your sync folder in the Koofr desktop app. Read on and find out more.
How does the .syncignore file work?
To be able to use the advanced exclusion (or inclusion) rules, you'll need to create a .syncignore file in the root of the folder that is being synced in the Koofr desktop app. In our case, we would put the .syncignore file into the JohnSuitcaseDesktop folder.
Note: You can create the .syncignore file by creating a new text file, deleting its extension and renaming it to .syncignore. The .syncignore file will not work if it has an extension, so be careful to remove it.
Note: The .syncignore file that is not at the root level of the folder that is being synced, will be ignored. If you have multiple synchronisations set-up, you will need a separate .syncignore file in each of the sync's root folders.
Important: It is smart to first create the .syncignore file inside the folder you wish to sync and then create the synchronisation to Koofr. Why? If you create a .syncignore file later and add it to an already existing sync, the files that were already synchronised will not be removed from the servers. Also, if you add the .syncignore file on an existing synchronisation, you must restart the sync client.
What to put into the .syncignore file?
Inside the .syncignore file, write one exclusion/inclusion rule per line using the glob format. Don't worry, we'll help you with some examples.
(1) Exclude a file type from syncing: If you want to ignore all .txt files, no matter where in the sync they are located, add this into the .syncignore file:
*.txt
Note: This will ignore all of the .txt files inside a specific sync, no matter where in the file structure they are located.
(2) Exclude a specific file type in a certain folder from sync: If you want to ignore all .exe files in the /MyFiles folder inside your sync, add this into the .syncignore file:
MyFiles/*.exe
Note: This will ignore all .exe files inside the /MyFiles folder in your sync.
Note: In case you add a path pattern into the .syncignore file, for example: MyFiles/sample.exe, it is treated as a path, starting on top-level folder of the sync. It will only ignore MyFiles/sample.exe and not folders on a deeper level, like /samplefolder/MyFiles/sample.exe.
(3) Sync only a specific file type: If you want to ignore everything except .jpg files, add this into the .syncignore file:
*
!*.jpg
Note: This will ignore all of the other file types and sync only the .jpg files to Koofr.
(4) Exclude specific folders from syncing: If you want to ignore all files inside IgnoreThis folder, no matter how deep in the structure this folder is located, add this into the .syncignore file:
IgnoreThis/
And if you want to ignore a folder on root level, add this into the syncignore file:
/IgnoreOnlyOnRoot/
(5) Exclude a certain file in a specific folder: If you want to ignore the bar.rtf file inside the test folder on root of the sync, add this into the .syncignore file:
test/bar.rtf
Note: This is the same as if you would write /test/bar.rtf and it will ignore the bar.rtf file inside the test folder that is on root of your sync.
(6) Set exceptions from sync exclusion rules: If you want to make an exception and ignore all .txt files, with an exception of one, add this into the .syncignore file:
Do not ignore file on path /test/notignored_too.txt:
*.txt
!test/notignored_too.txt
Note: This will ignore all .txt files except the file notignored_too.txt inside the test folder.
Do not ignore file named notignored.txt anywhere:
*.txt
!notignored.txt
Note: This will ignore all .txt files except the file notignored.txt wherever it is located.
Read our previous blog post on this topic here.
Want to talk to us? Join us on the Koofr subreddit!