Hi
I am recently facing a strange problem while trying to execute a dos command in my perl script. For example
if I want to copy a file from a soure to a desitnation, it cant find that file. Eg.
$test=`copy C:\project\test\saves\output.txt D:\project\test\`;
print "$test\n";
#c:\project\term\test1.pl#
After executing the script, it gives me the print out at STDOUT as
"The system cannot find the indicated file"
But, when i use the dos command in a command window, the copy command executes.
i even try writing like
system(`copy C:\project\test\saves\output.txt D:\project\test\`);
...
But the msg is same along with some number like 256 is printed on STDOUT.
I dont understand the reason. The file name and paths are also correct.
I will be grateful, if any1 can give me a solution of this weired problem.
Thanks.
Ejaj
I am recently facing a strange problem while trying to execute a dos command in my perl script. For example
if I want to copy a file from a soure to a desitnation, it cant find that file. Eg.
$test=`copy C:\project\test\saves\output.txt D:\project\test\`;
print "$test\n";
#c:\project\term\test1.pl#
After executing the script, it gives me the print out at STDOUT as
"The system cannot find the indicated file"
But, when i use the dos command in a command window, the copy command executes.
i even try writing like
system(`copy C:\project\test\saves\output.txt D:\project\test\`);
...
But the msg is same along with some number like 256 is printed on STDOUT.
I dont understand the reason. The file name and paths are also correct.
I will be grateful, if any1 can give me a solution of this weired problem.
Thanks.
Ejaj