.stfolder not ignoring file with ampersand in name

I am just getting started with Syncthing. I would like to synchronize notes between my laptop, my server, and my phone, using different tools on each platform to actually create and edit notes.

On my laptop, I’m looking to use NValt to create one text file per note. NValt also creates a file named Notes & Settings where it stores its metadata. The ampersand (and the spaces) in the filename requires me to escape it in all shell commands:

$ file Notes\ \&\ Settings
Notes & Settings: Apple binary property list

I have attempted to add this to all of my devices’ .stfolder file:

$ cat .stfolder
Notes & Settings

I’ve tried various permutations, including escaping the ampersand (Notes & Settings), wrapping the filename in single quotes (‘Notes & Settings’), and replacing the ampersand with a single wildcard match (Notes ? Settings).

Despite this, the “Notes & Settings” file keeps getting transferred from my laptop to my server and to my phone. The “Notes & Settings” file is only of use on the laptop, so I’d like to exclude it from the other Syncthing devices.

I’m not sure if this is an outright bug, or if I’m simply doing something wrong. I have not tried “Notes*” in my .stfolder, because I’m afraid that’s too generic.

If I’m doing something wrong, I’d love to know about it. If this is, in fact, a bug, I’m happy to open an issue at GitHub.


I would expect both Notes & Settings and Notes ? Settings to work properly. No escaping or quoting. Please do open an issue for it!

Now that I think about it, there may be another issue with ignoring previously not ignored files on the source device… Ignoring it on the devices where it’s not supposed to be synced is the best ignoring it on the source is supposed to work too.

I’ll open an issue. Thanks.

Can you clarify the exact function of .stignore? Does that file tell Syncthing:

  1. “Ignore all incoming files that match this pattern”
  2. “Don’t ever transmit changes to files that match this pattern”

Since I’m just getting started, it’s easy enough for me to delete all my shared folders, and recreate them. It would be helpful to better understand .stignore so that I can choose what the actual source of the share is.


.stfolder is the wrong file, it’s supposed to be in .stignore, please retest and close the issue if fixed.


The function of the ignore patterns are currently, as of 0.14.5,

  • “never attempt to pull updates for (i.e., sync) this file, and disregard it when computing size summaries”, and
  • “do not scan this file for changes”

The loophole in that is that if the file existed before being ignored, and other devices were told about it, they will still think we have that version of it available for pulling and may try to do so. I think that’s a bug.

And yes, what Audrius says, I didn’t see that detail.


Yes, of course I was using the wrong file. I saw the .stfolder created automatically and just jumped into editing it without reading the actual file name!

Thanks for the explanation of the ignore logic. That’s very helpful!

1 Like

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