use Cwd 'chdir'; chdir '//10.1.1.5/Weblogiclogs'; #### my $createdir = '//10.1.1.5/Weblogiclogs' . strftime( '%y%d%e%H%M%S', localtime);