Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
go ahead... be a heretic
 
PerlMonks  

How can I know which file is add or del by Win32::ChangeNotify/POE::Component::Win32::ChangeNotify?

by benlaw (Scribe)
on Mar 14, 2006 at 19:10 UTC ( [id://536735]=perlquestion: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.

benlaw has asked for the wisdom of the Perl Monks concerning the following question:

Hi all monks,
I want to use Win32::ChangeNotify(or POE::Component::Win32::ChangeNotify) to monitor directory, however, how can i retrieve the file name which add/del?
  • Comment on How can I know which file is add or del by Win32::ChangeNotify/POE::Component::Win32::ChangeNotify?

Replies are listed 'Best First'.
Re: How can I know which file is add or del by Win32::ChangeNotify/POE::Component::Win32::ChangeNotify?
by runrig (Abbot) on Mar 14, 2006 at 19:43 UTC

    Win32::ChangeNotify does not provide that information. You would have to figure it out yourself by listing the directory before and after the notification and comparing the results. There is another module Win32::AdvNotify which, if you can find the module (update: here is a link), would provide that information, but keep in mind that that module is long unsupported, no source is available, and the author is MIA.

    BTW, I could not get POE::Component::Win32::ChangeNotify to work, have you had any better luck? For me, the program exits before it ever calls the notification routine.

      Hi runrig,

      I downloaded Win32::AdvNofify, but how can i install the module? There is a html file which say install API(http://www.generation.net/~aminer/Perl) before install the module but the link is already unavailable @@ is it talking about win32::API ?

      I cannot run POE::Component::Win32::ChangeNotify as well, than I try POE v 0.3301(from CPAN), it can work now, however, the example code exit and print twice of message when it notify
Re: How can I know which file is add or del by Win32::ChangeNotify/POE::Component::Win32::ChangeNotify?
by ikegami (Patriarch) on Mar 14, 2006 at 22:16 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://536735]
Approved by Moriarty
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.