Understanding 'Watch' option and execute script on change

After reading thru the documentation, I’m still confused as to the point of the ‘Watch for Changes’ option in Folder Settings/Advanced. Is this simply a trigger for some function? W/O that option enabled though, I still get automatic syncing.

I would like to run a BAT file or similar script upon specific Folder updates. There looks to be some ability to do so via linux scripting, but I don’t see anything related to Windows. Would someone please point me in the right direction, if appropriate.

My PC: Windows 11 22H2 Using SyncTrayzor

Syncthing will not help you do this, regardless of the watch settings. You need to use some other tool for it.

This happens because SyncTrayzor has got its own file watching functionality which triggers when you disable the one that’s built into Syncthing. You would need to disable both in order to feel any difference.

In short, with file watching enabled, Syncthing (and SyncTrayzor) is able to receive notifications from the OS about file changes and act immediately. Without file watching, Syncthing by default is set to scan each folder every 60 seconds in order to detect changes manually. The latter can potentially have much higher performance impact and other negative consequences, e.g. on mobile devices that rely on battery power.

Thanks, both.

For what it’s worth, there is a ticket for this

And there seems to be a solution (… which seems to only work for linux) by @desbma . If it is important to you, you might have some luck running this in wsl on windows.

I mean there’s the event API on a http REST endpoint - I guess you can script that from some windows script thing: Event API — Syncthing documentation