I'm looking for input from the community for a utility that can set up a filesystemwatcher, ie, it can hook into File System events that detect when a file is created in a specific directory, and then be able to perform commands once that happens.
So here's my scenario:
- Configure this utility (ideally a windows service?):
- to watch C:\SpecialWatchedDirectory1
- if a .SQL file is created, run a batch file, "ExecuteSchemaUpdate.bat %1"
- set up FTP, enable uploads to "C:\SpecialWatchedDirectory1"
- I upload a SQL script, ie, "DBSchema1.sql" and it runs.
- since this utility looks for CREATED files, the script doesn't move the file out, it just waits for the next file to be uploaded.
- I upload DbSchema2.sql and it runs "ExecuteSchemaUpdate.bat %1" again.
I'm looking for an alternative than have a scheduled task to poll the directory every 5 minutes.