P
Pea
Hello,
I have a script which copies files on NT from one server to another.
I would like to do a test/confirmation of the copy. Here is my
command which reads the file name from STDIN:
system ("copy /V $_ $destination");
On NT if the file is copied successfully it will read "1 file(s)
copied." How can I get more descriptive output or read the output and
if it reads "1 file(s) copied.", print something that tells the file
name was copied to the destination. I tried $| and it printed a '1'
with a good copy and an unsuccessful copy. I also tried writing the
output to a file with >> but I have a feeling that reading that file
for errors is not the best way to do this.
I also tried adding "or die..." but that always said the file was
missing even though it was already copied.
any hints?
thanks!
I have a script which copies files on NT from one server to another.
I would like to do a test/confirmation of the copy. Here is my
command which reads the file name from STDIN:
system ("copy /V $_ $destination");
On NT if the file is copied successfully it will read "1 file(s)
copied." How can I get more descriptive output or read the output and
if it reads "1 file(s) copied.", print something that tells the file
name was copied to the destination. I tried $| and it printed a '1'
with a good copy and an unsuccessful copy. I also tried writing the
output to a file with >> but I have a feeling that reading that file
for errors is not the best way to do this.
I also tried adding "or die..." but that always said the file was
missing even though it was already copied.
any hints?
thanks!