Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Copy Unicode Directory Recursively

by Anonymous Monk
on Feb 12, 2018 at 12:07 UTC ( #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
Node Status?
node history
Node Type: perlquestion [id://1208983]
Approved by marto
Front-paged by haukex
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2018-08-16 15:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (168 votes). Check out past polls.

    Notices?