.stignore problem

Hi,

On my android I tried creating the .stignore with the following

(?!)!.pdf **

What I’m trying to do is to ignore all but pdf files. the structure of the root folder is

MainFolder Folder1 Folder2

I want this rule to work in all folders (folder1 & folder2) as well as the root folder MainFolder

For some reason it is not working?!

Thank you

How about

(?i)!.pdf
(?d)*

?

Same, not working. I moved couple of pdf files in that folder and they were not copied.

Thank you for your reply!

How are you editing the ignore patterns? Can you post a screenshot showing the ignore patterns in the Syncthing Web GUI?

Wait, so I edit/update the ignore patterns in/through the Syncting Android app which creates the .stignore file inside the folder on my Android. Am I doing it wrong? My Syncting works btw my phone and my NAS.

Thanks

Yeah, I’ve got a feeling something isn’t right there. Can you open the Web GUI on Android using the left slide-out menu, then go to “Edit Folder” there and see what the ignore patterns look like?

Basically, what I’d like to see is something like

It looks just like your example

The above should work (except the last ? which shoudn’t be there).

Could you write below all the steps you’ve been trying to do in details? Including some example PDF filenames will also help. More screenshots of the GUI showing the folder in question, including its local and global state will be useful too.

So I created a brand new folder on my NAS and created brand new folder on my Android. Then:

  1. In Syncthing web GUI on my PC (NAS) I added the new folder and shared it with my Android
  2. On my Android I got a notification that a new folder has been shared
  3. I set up the new shared folder in my android and I pointed it to the new folder in my Android
  4. in the Android Web GUI I edited the newly added folder and I added the following in the ignore pattern:

(?i)!.pdf

(?d)*

  1. I copied a new pdf file into the newly created android folder

the file was not copied into my NAS.

  • If I remove the Ignore Patterns

(?i)!.pdf

(?d)*

the file is sucessfuly copied!

Very confused?!?

Thank you

Here is a screenshots of the GUI showing the folder in question, including its local and global state

Thanks for all the details, and now I see that the patterns I wrote before are actually wrong :lying_face:.

Obviously, there was a wildcard missing. Please try the following instead.

(?i)!*.pdf
(?d)*
1 Like

That did it!!

Thank you for your help and for sticking with me :beers:

Sometimes I use this kind of list to exclude all stuff but pattern. Although my list is like this (notice the difference on the last line) :

!<stuff to sync pattern>
*  

Isn’t it dangerous to have (?d)* instead, which IIUC means “Allow any deletion requested by peers”, even beyond the ones “OS generated files” according to the ignore doc which ST has no way to know without relaying on files attributes (but an attribute as S for System does not exist in e.g. linux ext FS AFAIK).

Maybe there is something confused in my mind.

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