Hi,
I'm trying to get a basic script working that will scan a directory and then delete/submit all the files to IW stage. It seems to be failing at the delete step --> unlink($fullpath);
use File::Find;
my $dir = "/default/main/mfs/WORKAREA/mfsemc/files/kana/1050/";
my @files;
find(\&wanted, $dir);
foreach $filepath(@files) {
$fullpath = "/iwmnt" . "$filepath";
unlink($fullpath);
submitdeletion($filepath);
my $result = qx($command 2>&1);
if ($?) {
print "CMD: $command\n=> $result\n";
}
}
sub wanted {-f && push(@files, $File::Find::name);}
sub submitdeletion
{
$path = shift;
$command = "/iw-home/bin/iwsubmit -w -r $path \"Expired content in kana directory\" ";
$result = `$command 2>&1`;
}
Thanks for any help.