Nextcloud symc-exclude.lst

Hi!

I have now chosen nextcloud for syncing my files across my servers and computers for accessing them on any “client” I have.

But… On some “clients” I only want some files to be synced. For example on my a server, that I have a docker container that need access to one folder. This is because of space limitations(small server).

Because the server is headless, I have now nexcloudclient-cmd installed and using it combined with this script:

and a cronjob that sync every minute.

On top of that I made a custom sync-exclude.lst with the other root folder names I didn’t want to sync. But here comes the problem…

The thing is that when I add a folder name to sync-exclude.lst it also exclude folder recursive…
So generic name of a subfolder “notes” will also exclude sub-folders in the folder I want to sync.

So essentially, I wonder if you in some way can edit sync-exclude.lst in any way so it isn’t recursive/only root folders/or whitelist some folders?

I have read this documentation:
https://docs.nextcloud.com/desktop/2.5/architecture.html#ignored-files-label
But it doesn’t have any option for my use case… Is it that bad that I need to use unique names for every file? Any other suggestion?

Best regards