How to move the folder, in which folder name containing junk characters. (ex:Theoretical Analysis_Ferda ?–zdemir S??nmez). Here there are some letters ? & ?). Please help me with this. Thanks in advance
You can use Win32::Unicode::Dir. For example:
use strict; use warnings; use utf8; use Win32::Unicode::Console; use Win32::Unicode::Dir (); my $dir = 'S??nmez'; my $dest = 'temp'; Win32::Unicode::Dir::mkpathW($dest) or dieW "Could not create directory '$dest': $!"; Win32::Unicode::Dir::mvtreeW( "${dir}/", $dest) or dieW "Cannot move '$dir' to '$dest': $!"; Win32::Unicode::Dir::rmdirW( $dir) or dieW "Cannot delete source directory name '$dir': $!";
See also How to delete folder with unicode character filenames using Perl rmtree?
2.1m questions
2.1m answers
60 comments
57.0k users