I have some batch scripts which wait for files. The wait loop is done with the typical IF EXISTS loop:
:waitloop IF EXISTS file.zip GOTO waitloopend sleep.exe 60 goto waitloop : waitloopend
I am looking for a more efficient way of waiting for files. Something like a waitfile.exe command which will block and wait until the file appears. Internally, it should use the FileSystemWatcher class to be able to exit as soon as the file appears.
In Linux I have my own Perl script which internally uses Inotify.
Do you know if there exists a tool like this?