kensington43
Technical User
I dont have access to File::Copy on my Workstation so I am doing my File Copy manually.
This works:
The issue is when I run this in DOS command prompt it shows output of "1 file(s} copied" for each line in my Source file (First.txt).
If I have 4 lines of text it will show this:
Please advise how I can eliminate this output?
This works:
Code:
use strict;
my $listFile = "C:\\First.txt";
my $listFile2 = "C:\\Second.txt";
open(LIST, $listFile) || die "Cant open $listFile : $!";
while(<LIST>)
{
system("copy $listFile $listFile2");
}
close(LIST);
The issue is when I run this in DOS command prompt it shows output of "1 file(s} copied" for each line in my Source file (First.txt).
If I have 4 lines of text it will show this:
Code:
C:\Perl\bin>copyF.pl
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
Please advise how I can eliminate this output?