[SOLVED] Run batch whenever a file is saved

yossid

Reputable
Jan 5, 2016
1
0
4,510
I want to keep a history of changes to a file so I'm looking for a way to make a backup copy of that file each time it is saved/changed. I have a batch file that will copy the file to a backup location and add a timestamp tot he filename, and now I need a way to trigger that batch file each time the file is saved.

I'm wondering if Windows Task Scheduler can do that, but I can't figure out how.

Any ideas?

Thanks.
 
Solution
I am pretty sure there are ready-made utilities which can monitor a folder for changes and take an action. I can see a batchfile made specifically for a single file with hard-coded name - just run a loop and check for changes, although I think PowerShell is better choice.
I am pretty sure there are ready-made utilities which can monitor a folder for changes and take an action. I can see a batchfile made specifically for a single file with hard-coded name - just run a loop and check for changes, although I think PowerShell is better choice.
 
Solution