I am experiencing some wierd issue with this piece of code. If there are multiple bad files in the source the move works fine with all but one file. The is the error i get. I dont understand how this could be a permissions issue when it works for all other files but one This is the error i see
can't copy bad file \\<server>/Data/DATA_DIR/INBOUND/TESTMD5/TESTFILE4.txt to import folde r \\server\Data\DATA_DIR\INBOUND\TESTMD5\import\TESTFILE4.txt.DUPLICATE: Permission denied
for my $file (@bad_files) { (my $volume, my $SrcDir_part, my $SrcPattern) = File::Spec->splitp +ath($file); my $outdir=File::Spec->catdir($SrcDir_part,"import"); $outdir = File::Spec->catdir($volume,$outdir); my $bad_file = File::Spec->catdir($outdir, $SrcPattern); $bad_file = "$bad_file\.DUPLICATE"; move($file, $bad_file) or $logger->logdie("can't copy bad file $fi +le to import folder $bad_file: $!"); #unlink $file or die "$? : $! - error"; push(@attach_list,"$bad_file"); }
In reply to Wierd move issue by sri1230
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |