Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks

If there is one thing I really hate is the buzz about unicode + Perl in Windows. Way too complicated, for me at least. Now I am trying to copy 1 to 1 a directory (with subfolders and files) to another location. Directory and/or files may contain unicode names (at least this is what I suppose: üäö, cyrillc, and so on). I am failing. I cannot install Win32::Unicode.

I tried:

use File::Copy::Recursive qw(dircopy); dircopy($from,$to) or "Move $from -> $to failed: $!";

If in my folder structure there is a file called üüü.txt it just fails (no error message) i.e. it skips the file. What alternative on Windows would you suggest?

Replies are listed 'Best First'.
Re: Copy Unicode Directory Recursively
by Anonymous Monk on Feb 12, 2018 at 12:12 UTC
    Why cant you install win32::unicode?

      It just fail to install. There is another post on Perlmonks (last week) with somebody having the same problem... and some discussion about it.

        Here you go

        cpan -i -T Win32::Unicode

Re: Copy Unicode Directory Recursively
by Anonymous Monk on Feb 12, 2018 at 12:13 UTC
    Have you tried xcopy?
      Or Robocopy. There's no good reason to insist on doing this in Perl, especially if that fails.
        Heh ive never even had the chance to use xcopy... And apparently it has serious limitations (254 path length)... Win32::unicode cptreeW otoh works