Advertise folder structure while ignoring files

I want to run one master Syncthing node and several clients connected to it. On the master node I plan to have a large folder that will be shared with clients. When client accepts a folder share they will ignore all files at first. Then I would like clients to selectively include sub-directories and files they want to sync (to have locally available).

Currently, this scenario is possible given that clients know the folder structure to write ignore patterns. My question is how would I make master node to advertise the folder structure? Ideally, I would like to have a file perhaps in .stfolder that will contain all directories and files that master node can potentially sync with the client.

Is there a built-in way to achive this?

Alternatively, I can write a file watcher that would put that file under .stfolder. Can I put arbitrary files to .stfolder and is that folder synced between devices?

Nope. I don’t think so. One could imagine that an ignore pattern like


might ignore everything and then unignore all directories (the trailing slash meaning directory), but I don’t think that’s the case today.

You can put what you like there, but you are trampling inside what Syncthing considers its own namespace. Things may get changed or removed without warning. The .stfolder directory/marker is never synced.

I would do something like ls -lR > ls-lR.txt on the central device and have clients not ignore that file. Like you’re suggesting, but don’t involve .stfolder.


Thanks for the quick response!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.