Windows: Monitoring Script Files (Batch / VBS)

I am currently working on a script to create a custom backup of the script, the only thing I am missing is the file monitor. I need a script form that will track the folder for file changes and then run the command with the modified file.

So, for example, if the file changes, it will execute "c: /syncbatch.bat% Location_Of_File%"

Any help on where to start should be greatly appreciated. Many thanks!

+5
source share
2 answers

In VBScript, you can track the folder for file changes by subscribing to a WMI event __InstanceModificationEvent. These articles contain sample code that you can learn and adapt to your specific needs:

+5
source

WMI , WMI, , , , , . , Dropbox, , VBScript, 10- WScript.Sleep , . , , , script , , , , WMI.

Spy http://venussoftcorporation.blogspot.com/2010/05/thefolderspy.html DOT.NET /, GUI, , . , . , my script , , .

script, myscript.vbs "* f" script. . , , , , , .

, script, , , , . , , , , , . .

0

All Articles