Use code tags to ensure your code is formatted correctly. Here is your code nicely formatted:
$sourcedir="J:/sortdata/sortsafe/probers/prbrsort/EG_ROOT/PRODUCTS";
$timestamp=($targetdir.$date);
mkdir ($timestamp) || die "Cannot mkdir $targetdir: $!";
@args = ("xcopy $sourcedir $timestamp");
system(@args) == 0 || die "Cannot xcopy @args";
What error are you having? How do you set $date? Check out System for details of how to call system What you are doing is fine and dandy but I believe the intent is ("xcopy",$sourcedir,$timestamp). Does anyone else know why this is and what difference it makes?
I would recomend printing @args and try running the command by hand to see if your command is correctly formatted.
--
Zigster |