Windows: File Monitoring Script (Batch/VBS)

前端 未结 2 1518
刺人心
刺人心 2021-01-05 14:59

I\'m currently in working on a script to create a custom backup script, the only piece I\'m missing is a file monitor. I need some form of a script that will monitor a folde

2条回答
  •  逝去的感伤
    2021-01-05 15:41

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

    • WMI and File System Monitoring
    • How Can I Monitor for Different Types of Events With Just One Script?

提交回复
热议问题