I wanted to get rid of Nextcloud so I started to setup all my folders on my NAS. I got annoyed by the lack of options to filter folders.

«.git» folders are filtered thanks to an opt-in button on the main menu although generated folders by Unity, Nodes and Pythons are still being synced and it lead to a mass amount of useless files being pushed to the NAS (>300,000 small files).

Someone on github got annoyed too and found a hacky way to filter folders we don't need: A configuration file is available.

Here the gist https://gist.github.com/derekedelaney/4e11b8996d1dcc800ecad96ae7c5269e

You can find your working folders on this path: ~\AppData\Local\SynologyDrive\data\session\ folders in this directory are digits, those are the position in your Synology Share Folder list. There will be a conf folder with inside blacklist.filter we can edit. For example my full path is:

Path
----
C:\Users\wolf\AppData\Local\SynologyDrive\data\session\6\conf

In this file there is an empty section called "Directory", it is possible here to add the filters we need. I proceeded this way:

[Version]
major = 1
minor = 1

[Common]
black_prefix = "."
max_length = 0
max_path = 0

[File]
black_suffix = ".lnk", ".pst", ".swp", ".temp", ".tmp"

max_size = 0

[Directory]
black_name = ".cache", ".node-gyp", "bower_components", "node_modules", "__pycache__", "Library", "Lib"

[EA]

Save the file, restart the software to apply changes. If there is an error, double check mistakes in your settings: extra characters and typo.