Ignore Pattern: exclude all image files from a folder

Documentation is here: Ignoring Files — Syncthing v1.22.2 documentation However I am not familiar enough with the syntax, so wanted to ask first.

Looking to exclude all image files forn a large folder (my music folder has some booklet images but I don’t need those and they mess up the image library on mobile - I know I could exclude that folder, but if I can prevent them from being synced in the first place all the better).

So I need a rule that removes the already synced picutre files and prevents all pictures (jpg and png) from being synced again.

Would this work?


Syncthing will not remove files that it is told to ignore, so you will need to delete them yourself. But these patterns should work to keep them from syncing to the phone again.

It’s not quite easy to get to a clean state if they have been synced before. When simply adding the patterns on both sides, the DB will still list them after deletion, so you possibly get to a permanently unfinished state of your remote devices. Best would be to actually remove the images from the synced folder by moving somewhere else, before adding the ignore patterns. Once Syncthing has picked up the fact they are gone, set the ignores and move them back where they were, which won’t get noticed anymore.

There are other ways to achieve such a “clean” state, but might involve re-scanning all files, which could take a long time on a phone. Just try the ignore patterns (same on both sides) first and see whether you get any out of sync statuses.

Thanks for elaborating. I understand my setup is not ideal and I may consider removing all images from the music folders. It was a bad idea to put them there in the first place.

Will have to find a way to handle those images. Probably in a separate folder structure. I initially had all images inside the music files which resulted in other issues. But all that is a discussion to be had in a different forum as it is not Syncthing related.

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