in reply to Re^2: Reading progress of "copy" executed asynchronously
in thread Reading progress of "copy" executed asynchronously
I was not aware Windows reports incorrect filesizes. Then you have to rely on copy's reporting. Use this pipe-open form instead:
use strict; use warnings; my $cmd = 'copy.exe 'from', 'to', '/z' |'; open(EXE, $cmd) || die "$!"; while(<EXE>){ print "read from program output: ".$_."\n"; } print "done.\n"; close(EXE);
Or use IPC::Run or any other IPC::* module mentioned here or there.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Reading progress of "copy" executed asynchronously
by neWerminder (Novice) on Aug 10, 2018 at 08:26 UTC | |
by vr (Curate) on Aug 10, 2018 at 12:48 UTC | |
by bliako (Abbot) on Aug 10, 2018 at 09:52 UTC |