Thank you all for your help so far. For now I have sttlled on something like:
do{ $create = -C "test1.jpg"; $modify = -M "test1.jpg"; }until ($create == $modify and $create > 0); # Then process file or whatever.....
I tried several things such as code I found here at the monestary to monitor the windows process list like so:
use Win32::PerfLib; sub get_remote_process_list { my $server = $_[0]; my %rtasks; my %counter; Win32::PerfLib::GetCounterNames($server, \%counter); my %r_counter = map { $counter{$_} => $_ } keys %counter; my $process_obj = $r_counter{Process}; my $process_id = $r_counter{'ID Process'}; my $perflib = new Win32::PerfLib($server); my $proc_ref = {}; $perflib->GetObjectList($process_obj, $proc_ref); $perflib->Close(); my $instance_ref = $proc_ref->{Objects}->{$process_obj}->{Instance +s}; foreach my $p (sort keys %{$instance_ref}){ my $counter_ref = $instance_ref->{$p}->{Counters}; foreach my $i (keys %{$counter_ref}){ if($counter_ref->{$i}->{CounterNameTitleIndex} == $process +_id){ print "$instance_ref->{$p}->{Name} "; $rtasks{$counter_ref->{$i}->{Counter}} = $instance_ref +->{$p}->{Name}; } } } return %rtasks; }
But I never saw a new Process appear in the list when someone was uploading so I had no idea what to monitor. Btw, I am testing this on my local network using WSFTP to send a file to a second computer. I also tried something like:
use Win32::Process; use Win32; sub ErrorReport{ print Win32::FormatMessage( Win32::GetLastError() ); } Win32::Process::Create($ProcessObj, "C:/WINNT/system32/CMD.EXE", "dir", # p +rint dir just to see if I can do anything at all 0, CREATE_NEW_CONSOLE, ".")|| die ErrorReport(); $ProcessObj->Wait(INFINITE);
because the shell acting like I wanted as far as renaming went, but I never could sent any commands to the new "Dos" window. frustrating......

In reply to Re: Rename Uploaded Files by Anonymous Monk
in thread Rename Uploaded Files by Anonymous Monk

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.