********************* use POSIX; ********************************************** * Specify remote share the script will affect *********************************************** my $filedir = "\\\\10.1.1.5\\Weblogiclogs"; *************************************************** * Specify any logs in the weblogiclogs directory **************************************************** my $IWlogs = "\\\\10.1.1.5\\Weblogiclogs\\*.log*"; # Get Local Time and Create folder based on local time stamped my $createdir = strftime( '%y%d%e%H%M%S', localtime); # Create folder based on local time obtained above if(!-e $createDir) { mkdir $createdir or die "Couln't create $createdir because $!($^E)\n"; } # move logs files to new created directory named after # the local time. @args = ( "move" , $IWlogs , $createDir ) ; system( @args ) == 0 or die "error moving $IWlogs reason $!($^E)"; #