I have discovered that if the original filename does not contain unicode chars (ie all 7-bit ascii), my program can create an 8dot3 name. So the following works:
my $trans2 = `fsutil file setShortName \"C:\\Users\\James\\Music\\thewarrior16\" \"THEW~001\"`;
But if the filename contains unicode, the fsutil command fails. So the following does NOT work:
my $trans = `fsutil file setShortName \"C:\\Users\\James\\Music\\國語懷念老歌 Vol. 2\" \"Vol2~0UG\"`;
Is perl somehow mangling the unicode chars before it passes them to fsutil? There's got to be a simple solution to this. But then, considering what a mess perl's handling of unicode is, maybe not ...
Any more ideas?
In reply to Re^3: Problem running shell command from Perl
by CrashBlossom
in thread Problem running shell command from Perl
by CrashBlossom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |