Thankx everybody for ur interest.... on this I modified my code like following ...
use Win32::ChangeNotify; print " \n Enter a file path "; $pt = <STDIN>; chomp $pt; $notify = Win32::ChangeNotify->new($pt, true ,"SIZE"); $cnt = 0; while(1) { $cnt++; if ($cnt > 1) { print " \n File copy is going on "; $notify->reset; } $lmt--; next if ($notify->wait(10000)); print " \n The counter value is $cnt \n "; last; } print " \n hello world "; $notify->Close();
after I set one file for copy if I execute the script it will only show the result as following: "The counter value is 1" "hello world ." That means it is not iterating through the loop after 1 st wait call because wait call unable to get signalled within 10000 milliseonds although hfe file copy still is going on.. . I think because while copying windows allocates size priorly in the destination as same size of source thats why although its being copied and getting increased in sized.. the $notify->wait(10000) call unable to detect the changes in filesize.

In reply to Re^2: unable to monitor file size change with win32::changenotify by somsub
in thread unable to monitor file size change with win32::changenotify by somsub

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.