**Error Message I get when running the script on Win2K *** D:\Perl\bin>perl -w service.pl 10.1.1.5 Alerter usage: posix /c [] error creating \\10.1.1.5\Weblogiclogs\02091812! at service.pl line 27. ********************************************************** use Win32::Service; my $filedir = "\\\\10.1.1.5\\Weblogiclogs"; my $IWlogs = "\\\\10.1.1.5\\Weblogiclogs\\*.log*"; ############################################################### # Get Local Time and Create folder based on local time stamped ############################################################### ($sec,$min,$hour,$mday,$mon,$year) = localtime(time); $mon = (1,2,3,4,5,6,7,8,9,10,11,12)[$mon]; if($mon < 10){$mon = "0" . $mon;} # add a leading zero to one-digit months if($mday < 10){$mday = "0" . $mday;} # add a leading zero to one-digit days if($hour < 10){$hour = "0" . $hour;} # add a leading zero to one-digit hours if($min < 10){$min = "0" . $min;} # add a leading zero to one-digit minutes if($sec < 10){$sec = "0" . $sec;} # add a leading zero to one-digit seconds ################################################## # Create folder based on local time obtained above # - This is where the script is erroring out at.... ################################################## if(!-e $createDir) { @args = ( "mkdir", $createDir); system(@args) == 0 or die "error creating $createDir!"; } ########################################################## # move logs files to new created directory named after # the local time. ########################################################### @args = ( "move" , $IWlogs , $createDir ) ; system( @args ) == 0 or die "error moving $IWlogs!"; ############################### # Restart remote Service ############################### $i=0; @ARGV = ('-') unless @ARGV; while ($ARGV = shift) { $home[$i] = $ARGV; $i = $i + 1; } $restart = 1; if ($restart == 1) {&StartServ($home[0],$home[1])}; sub StartServ { $computername = shift; $servicename = shift; Win32::Service::GetStatus("\\\\".$computername, $servicename, \%status); die "service is arealdy started, please check and try again...\n" if ($status{CurrentState} == 4); Win32::Service::StartService("\\\\".$computername,$servicename) || die "Can't start service\n"; print "Your desired service is now started...Have a nice day!\n"; }