Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 romping around the Monastery: (7)
As of 2014-08-30 21:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls