in windows, launch tasks when a file/directory is modified

0

In linux/mac, for monitoring the changes in a file or directory, I can use tools like gruntjs, this launch tasks when a file is modified ?

exist a similar tool for windows ?

juanpablo

Posted 2014-07-03T13:33:11.360

Reputation: 5 216

Answers

0

https://serverfault.com/questions/277450/how-to-trigger-a-task-at-any-change-on-a-folder-with-windows-server-task-schedul

Don't think its possible with Task Scheduler, but Powershell should be able to do it (Assuming your running a version of Windows with Powershell).

Jonny Wright

Posted 2014-07-03T13:33:11.360

Reputation: 825

yes, I solved with powershell https://gist.github.com/juanpabloaj/40f9fa00964d566a8b0b

– juanpablo – 2014-07-18T13:10:55.577

0

Two tools, that can do exactly what you need.

1.TheFolderSpy-Freeware-Download link

2.Watch 4 Folder-pay version-Download link

You can execute any *.exe file when a file/folder is modified, and "Watch 4 Folder" can execute a *.bat file also.

Ĭsααc tիε βöss

Posted 2014-07-03T13:33:11.360

Reputation: 1 772

0

You can write a batch file that will run in an infinite loop with, say, 1s delay between checks. The batch file would issue DIR command for target directory/file and redirect output to a temporary file. It could then issue a COMP command to compare with previous output of DIR and if output of COMP is not null custom action could be performed.

Art Gertner

Posted 2014-07-03T13:33:11.360

Reputation: 6 417