I used the below perl code to check the change in file size :
1>use Win32::ChangeNotify ;
2>print " \n Enter a file path ";
3>$pt = <STDIN>;
4>chomp $pt;
5>$notify = Win32::ChangeNotify->new($pt, true ,"SIZE");
6>unless ($notify->wait( '1000' ))
7>{
8> print "Nothing Changed";
9>}
10>
11>$notify->reset;
12>print 'Something changed';
after executing the above code (saved in fl1.pl) it asks for the path name (the path where the file is actually getting copied)including the file name .
But after giving the file path (e.g F:\test1\ee.avi )
It throws error in command console "Can't call method "wait" on an undefined value at fl1.pl line 6, <STDIN> line 1."
Could any one please help me how to modify this code.. or whats wrong with this.. so that it can monitor(periodicaly) .. the change in file size which is ( ee.avi sized 1.9 gb )getting downloaded .
Advance thanks for any suggestions on this....
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.