Activating a program when files in a folder change?


New Member
I would like to watch a certain folder and run a program ASAP when it receives any new files. It would seem to me that a service is the logical alert mechanism, but there doesn't seem to be an option in creating a service to trigger a program on that event. The program triggered can most easily be a batch file, but if it were an .exe, I could probably handle that.

The best I've been able to do so far is a service that triggers a batch file every few minutes to look at the folder and do whatever, but this creates an annoying flash on my screen every time it runs. I suppose it is quite inefficient as well, because I expect the event to be rare. But when it happens, a response should ideally occur within a few seconds.

I'm sure the ability exists in Windows somehow, because I have software that can do this for its own purposes (in fact, it can watch hundreds of folders, not just one).

Any suggestions?


Cloud Security Engineer
Staff member
The ability does exist just not as a simple tool built into Windows. It would have to be a developed application or Powershell script leveraging the dotNET class System.IO.FileSystemWatcher


Windows Forum Team
Staff member
Premium Supporter
he will need at least the first service pack and perhaps C++ to use net6 on W7 but thats a nice fix