Anybody know why my 'mkdir' calls are not working?
# -------------------- Begin Declare Variables Section
my($ORAHOME,$ORASID,$CONNECTUSER); $BACKUPDIR = undef; $LOGDIR = undef; $LOGFILE = '\export_samsdb.log';
# :::::::::::::::::::: End Declare Variables Section
# :::::::::::::::::::: Begin Parameter Checking Section
Start: print "\n What is the Oracle Home path ?"; chomp($ORAHOME = <STDIN>); print "What is the Oracle SID ?"; chomp($ORASID = <STDIN>); print "What is the username\/password ?"; chomp($CONNECTUSER = <STDIN>);
if (!defined($ORASID)) { print '***********Did not define the Oracle SID'; goto Start; }
# Create backup directories if already not exist
unless (-d $BACKUPDIR) { print "Attempting to make BACKUP directory $BACKUPDIR
\.\.\.\.\.\. \n";}
if (mkdir ($BACKUPDIR='C:\SAMS_DB_BKUP\EXPORT')) {
print "Directory made\.";}
else {print "Cannot create BACKUP directory \n";}
Could be a permissions thing - try printing the error msg out:
else {print "Cannot create BACKUP directory: $!";}
unless (-d $LOGDIR) {
print "Attempting to make LOG directory \.\.\.\.\.\. \n";}
if (mkdir ($LOGDIR='C:\SAMS_DB_BKUP\EXPORT\LOG')) {
print "Directory made\.";}
else {print "Cannot create LOG directory \n"; }
Same here.
# :::::::::::::::::::: Begin Export Section
system qw($ORAHOME.\\exp [EMAIL PROTECTED] full=Y file=$BACKUPDIR.\\samsdb.dmp log=$LOGFILE); open (loghandle, ">>" .$LOGDIR . $LOGFILE) or die "Cannot create log file"; print (loghandle "Export Completed Successfully");
close(loghandle);
# :::::::::::::::::::: End Export Section
-- ,-/- __ _ _ $Bill Luebkert ICQ=162126130 (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl) -/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/
_______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
