Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

cdarke's scratchpad

by cdarke (Prior)
on Apr 27, 2006 at 00:44 UTC ( #545917=scratchpad: print w/ replies, xml ) Need Help??

use Win32::ChangeNotify; my $Path = 'C:\\QA'; my $Events = 'FILE_NAME'; my $notify = Win32::ChangeNotify->new($Path,0,$Events); my %dir; @dir{glob("$Path\\*")} = undef; while (1) { print STDERR 'Waiting...'; $notify->wait or warn "Wait failed: $!\n"; $notify->reset(); my @files = glob("$Path\\*"); my @added = grep {!exists $dir{$_}} @files; print "Filenames added: @added\n" if @added; delete @dir{@files}; my @removed = keys %dir; print "Filenames removed: @removed\n" if @removed; undef %dir; @dir{@files} = undef; } $notify->close();
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2015-09-02 09:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred temperature scale is:










    Results (68 votes), past polls