Hi S/A's

I'm using Active Perl on Win NT.
I'm can't find the correct syntax to move a directory using Perl.
This is my script:

Note the three lines beginning with move near the end.
Those lines don't get executed at all, and no error is generated.
All other lines are executed.
Please point out my error or give me suggestions.


use Time::localtime;
use File::Path;
use File::Copy;

$year = localtime->year() + 1900;
$mon = localtime->mon() + 1;
$day = localtime->mday();
$yesterday = localtime->mday() - 1;
$dummy = 0;

if ($mon >= 10)
{
$dir_path = $year.$mon.$yesterday;
}
if ($mon < 10)
{
$dir_path = $year.$dummy.$mon.$yesterday;
}
printf "Year is %s\n", "$year";
printf "Month is %s\n", "$mon";
printf "Day is %s\n", "$day";
printf "Yesterday was %s\n", "$yesterday";
printf "Path to be created is %s\n", "$dir_path";

rmtree(["\\\\Nawalbe/Shared/Ora_Hot_Bkup/PROD/$dir_path"],1,1);
mkpath(["\\\\Nawalbe/Shared/Ora_Hot_Bkup/PROD/$dir_path"],1,0700);

#move(["\\\\Nawalbe/Shared/Ora_Hot_Bkup/PROD/8am","\\\\Nawalbe/Shared/Ora_Hot_Bkup/PROD/$dir_path"]);
#move(["\\\\Nawalbe/Shared/Ora_Hot_Bkup/PROD/12pm","\\\\Nawalbe/Shared/Ora_Hot_Bkup/PROD/$dir_path"]);
#move(["\\\\Nawalbe/Shared/Ora_Hot_Bkup/PROD/5pm","\\\\Nawalbe/Shared/Ora_Hot_Bkup/PROD/$dir_path"]);
move("N:/Ora_Hot_Bkup/PROD/8am","N:/Ora_Hot_Bkup/PROD/$dir_path/");
move("N:/Ora_Hot_Bkup/PROD/12pm","N:/Ora_Hot_Bkup/PROD/$dir_path/");
move("N:/Ora_Hot_Bkup/PROD/5pm","N:/Ora_Hot_Bkup/PROD/$dir_path/");

print "Press <Enter> to continue...";
$pause = <>;



Thanks in advance,

Denmark Weatherburne

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin

Reply via email to