Monks,
I am working on a small script to back up of some files that I am currently working on. The problem that I'm encountering is that when I run the script, I get a "Directory or file not found" error.
A short version of the code I'm using is:
The files that I want to transfer are in the directory pointed to in $from and I am able to successfully reach the location in $to. I have tried several variations of adding and removing *.cmd as well as adding a / to the beginning of the path.use strict; use warnings; use diagnostics; use File::Copy; my $from = "path/to/directory/*.cmd"; my $to = "path/to/new/directory/*.cmd"; copy($from, $to) or die "Copy failed: $!";
I'm sure that I'm missing some trivial detail, however I've been spending more time on this script that I really should and have been coming up empty.
In reply to Directory or file not found while using copy by rspishock
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |