in reply to Re^2: I go crazy with windows filenames with spaces!
in thread I go crazy with windows filenames with spaces!
I could not findWin32::GetShortPathName($fullpath);
But I've knocked up this which seems to work
my $GetShortPathName = new Win32::API('kernel32', 'GetShortPathName
+A', 'PPN', 'N');
die "Can't import API GetShortPathNameA:\n$!" unless defined $GetSh
my $longpath = shift;
my $length = 1 + length $longpath;
my $shortpath = ' ' x ($length);
$length = $GetShortPathName->Call($longpath, $shortpath, $length);
return substr($shortpath, 0, $length);