Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by benlaw (Scribe)
on Mar 15, 2006 at 00:10 UTC ( #536735=perlquestion: print w/replies, xml ) Need Help??

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 15, 2006 at 00: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 (Pope) on Mar 15, 2006 at 03: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
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2021-08-01 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?