WinBatch Technical Support Forum

Archived Boards => WinBatch Script Exchange => Topic started by: DAG_P6 on December 06, 2015, 08:33:27 pm

Title: Robust File System Watcher
Post by: DAG_P6 on December 06, 2015, 08:33:27 pm
Periodically, I see questions posted here about needing to monitor a directory for changes.

Yesterday, I was perusing the programs that SpiderOak has made open source, and came across their Directory Watcher utility, which their zero knowledge cloud backup software uses to identify files that need to be backed up. The source code, at https://github.com/SpiderOak/spideroak_windows_dir_watcher (https://github.com/SpiderOak/spideroak_windows_dir_watcher) is straightforward Microsoft C; as written, the program logs changes in a text file, which the backup routine scoops up, and uses to avoid the need to scan the whole filesystem to determine what needs to be backed up. While this solution to that problem isn't pure WinBatch, it could be easily used in conjunction with WIL scripts. The program is delivered in source code only, but it includes a shell script to build a working binary from it. If you have Visual Studio Community Edition, you should be able to use the script to build it, without even creating a project around it.