How can i make a filter

I get problem when sync file from pc to my phone, it sync every file that I put into folder I want to make a .stignore but I can’t understand the command can u guys help me make an example? like only sync the picture file as *.png and *.jpg extensions and ignore the *.crdownload

It depends a little on how you want to do it.


If you have specific extensions to ‘ignore’ you can just make something like;

*.crdownload

And that’ll be it. Only files ending in ‘.crdownload’ will be ignored, anything else are synced as usual. To add more extensions to ignore, add each on a new line in the same style.


If you want to reverse it, and only ‘include’ certain extensions, then you need to do some tricks to make this work:

!*.jpg
!*.png
*

Where you first define that you want to “not ignore” jpg and png, followed by “ignore the rest”.


The docs also contain some specific examples and explanations as to how it all works. See: Ignoring Files — Syncthing documentation

1 Like

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