The error message is strange, but I do see one issue with your code: readdir returns just the filenames without the directory name. I'd recommend you use File::Spec::Functions qw/catfile/; and move( catfile($InDir,$Infile), $OutDir ). If that fixes the issue, then perhaps the error message is just wrong (is this Windows or some OS other than *NIX?), and if it's doesn't fix the issue, please let us know Update: along with more information about $InDir and $OutDir. Also, Use strict and warnings!
In reply to Re: Move a file to another directory based on regex match
by haukex
in thread Move a file to another directory based on regex match
by DAN0207
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |