Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Copy Unicode Directory Recursively

by Anonymous Monk
on Feb 12, 2018 at 12:07 UTC ( [id://1208983]=perlquestion: print w/replies, xml ) Need Help??

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1208983]
Approved by marto
Front-paged by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-16 22:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found