Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Win32::ChangeNotify + $module = detect download ?

Reply
Thread Tools

Win32::ChangeNotify + $module = detect download ?

 
 
perl coder
Guest
Posts: n/a
 
      02-16-2004
I'm using the Win32::ChangeNotify to monitor a folder, in order to find
which files are being modified. I setup a handler with the LAST_WRITE
flag, and it works great, and I can find the exact filename that changed
by checking the timestamps of all the files in that folder.

One thing bugs me though: I can't detect whether or not a file is
changing because it's been closed or if it's still open and actively
being written to (frex, somebody downloading a file with a web browser
or something). So I'm wondering if there's a relatively easy way to
find this out. In Unix you can at least check with 'lsof' and
'netstat -nap' and get a good idea of what's going on, but I'm new to
the win32 world, and I'm still not sure of what's possible and what
isn't. Perhaps is there a module that will help with this? If not, I
noticed that Perl at least gives a way to make straight win32 system
calls (with Win32::API), so perhaps there's a system call I can use
then?

I'd rather avoid having to check a file at regular intervals to see if
it's changing. It might work, but doesn't sound like a very robust
solution.


--
No crazy stuff in my email.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to detect when a download is complete barthelemy.von.haller@gmail.com Javascript 2 01-09-2008 07:23 AM
Download freeware RKR scanning software (detect Sony rootkit & others) pamelafiischer@yahoo.com Computer Security 43 11-24-2005 12:20 AM
Download freeware RKR scanning software (detect Sony rootkit & others) pamelafiischer@yahoo.com Computer Support 43 11-24-2005 12:20 AM
Detect File is Completely Download by Client RC ASP .Net 5 05-19-2005 09:01 AM



Advertisments