in reply to Re: Rename Windows files with Unicode chars
in thread Rename Windows files with Unicode chars
The line
rename qq{I-\x{2665}-Perl}, 'I-love-Perl';is cheating. You were able to type in the name of the file that was to be renamed because you already knew what the original file name was. The problem is that I will never have such knowledge beforehand.
Can you show code that will read a file name in the given directory, complete with the file's non-ascii characters, save the original file name in some variable, then strip the non-ascii from the said file name, then rename the file (using the original, saved file name) to the new all-ascii file name?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Rename Windows files with Unicode chars
by beech (Parson) on Aug 27, 2016 at 03:44 UTC | |
by mnooning (Beadle) on Aug 27, 2016 at 20:23 UTC |