Ignore Patterns - How do I prevent syncing all subfolders only?

Basically I want to sync all the files (only files) in the synced directory, but prevent syncing all of the subfolders and all the files of those subfolders.

What are the ignore patterns I have to set to do that?

Thank you.

The following should do it.

/*/

However, Syncthing doesn’t discriminate between files and directories, so you can’t specifically ignore one or the other. This means that the directories located in the root path will still sync, however they will be empty.

Alternatively, if all your files have extensions (and directories don’t use . in their names), then you could try out something like this.

/*/
!*.*
/
2 Likes

Thank you. This works.

/*/
!*.*
/

As an additional question, what if I want to include a specific folder (eg my_folder) that is a direct descendent of this synced folder? Can I?

I figured it out. In order to allow a specific folder on my choosing I would have to do the following (for every computer in which the folder is to be synced):

!my_folder
/*/
!*.*
/

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