File Change Monitoring Tool =========================== Kohsuke Kawaguchi (kk@kohsuke.org) This little tool takes a list of files (including wildcards) as the command line arguments, and waits for one of them to be modified. If one of them is changed, the program exits with the error code that indicates which file it was. For example, if you invoke WaitForChange Makefile src\*.cpp and you modify src\a.cpp, then the exit code will be 2, because it was the 2nd argument. The program also exits if the ENTER key is pressed. In this case the exit code is 0. This tool is useful to automatically run a certain task whenever you save some files from an editor. For example, running htmllint/ browser every time you save an HTML file, or running XSLT automatically while you are editing a stylesheet. For example, as the following batch file: @echo off :start WaitForChange index.html htmllint index.html goto start Or from cygwin: $ while true; do WaitForChange index.html; htmllint index.html; done