use Win32; my $path =Win32::GetFullPathName($file); die Win32::GetLongPathName($path); # Win32::GetShortPathName