P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
There are a couple of options. One option is to create a thread for each file you want to monitor. If you go this route, check out the Thread::Queue module. You should run a search on this site for many good starting points. BrowserUK has given lots of advise and examples. A second option is to monitor a directory and then make a copy if you receive an modification event. There is a module Win32::ReadDirectoryChangesW which will tell you which file was modified and allow you to respond. It is a wrapper around the Win32 API ReadDirectoryChangesW. It is not on CPAN but can be found on this site - so you will need to copy and paste the module into your personal library directory. An short example, pieced from how I have used this module (untested).
There is also a third option if you have more than one directory which would be to use both methods 1 and 2. In reply to Re: File::Monitor problem with batch files
by tokpela
|
|