somsub has asked for the wisdom of the Perl Monks concerning the following question:
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....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';
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: unable to monitor file size change with win32::changenotify
by CountZero (Bishop) on Jul 11, 2009 at 21:55 UTC | |
Re: unable to monitor file size change with win32::changenotify
by Corion (Patriarch) on Jul 11, 2009 at 22:19 UTC | |
Re: unable to monitor file size change with win32::changenotify
by ramlight (Friar) on Jul 11, 2009 at 22:17 UTC | |
Re: unable to monitor file size change with win32::changenotify
by GrandFather (Saint) on Jul 11, 2009 at 23:42 UTC | |
by somsub (Initiate) on Jul 17, 2009 at 03:02 UTC |