Include Only vs. Exclude / Ignore?

I have a folder Sync\ with a few hundred folders, with no real patterns to speak of. I only want to sync Folder, OtherNamedFolder, and ThirdNamedFolder. (it’s actually a few dozen, but just for example.)

I want to make a file that is inclusive, containing only those three folders, rather than an ignore file, that contains hundreds of entries.

Is there a method to specify the inclusion of files/folders, rather than exclusions only?

The docs explain it.

I searched through the docs and reviewed the ignore files section. But there is nothing about including files that I could find. Perhaps you could point me to the correct article?

https://docs.syncthing.net/users/ignoring.html#patterns

A pattern beginning with a ! prefix negates the pattern: matching files are included (that is, not ignored). This can be used to override more general patterns that follow. Note that files in ignored directories can not be re-included this way. This is due to the fact that Syncthing stops scanning when it reaches an ignored directory, so doesn’t know what files it might contain.

Ah ok thank you for highlighting that section. So if I’m to understand correctly, my .stignore file should contain:

!Folder

!OtherNamedFolder

!ThirdNamedFolder

**

Is this right?

Yes, or a single start would do.

Very good. Thank you, I’ll give it a whirl! :slight_smile:

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