in reply to Re: Seeking help for copying recursive folders having some folder/file names in Chinese or japanese
in thread Seeking help for copying recursive folders having some folder/file names in Chinese or japanese

thanks for your response. Win32::Unicode::cptreeW works perfect in terms of copying the folder, but it do have an optimization for not copying the empty folders.

Is there a way to get rid of this optimization? I just need to have the exact same directory structure at destination as it is on source location.

  • Comment on Re^2: Seeking help for copying recursive folders having some folder/file names in Chinese or japanese

Replies are listed 'Best First'.
Re^3: Seeking help for copying recursive folders having some folder/file names in Chinese or japanese
by BrowserUk (Patriarch) on Jan 19, 2015 at 16:52 UTC
    but it do have an optimization for not copying the empty folders.

    It's not an optimisation as such; rather, just a side-effect of processing the tree the 'unix way'. Directories only get created if they do not exist when a file is to be copied into them.

    There is no architected API mechanism for changing this behaviour; nor can I see any easy way it could be retro-fitted or monkey patched to do so.

    My alternative would be to simply shell out to xcopy: system qq[ xcopy /E/I/C/O srcpath\\* destpath\\ ];.

    (You also might want to consider /G /H /R & /U. (See the help.))

    As it's supplied with the OS, it will be able to copy any files or directories that you've already created. It is also significantly quicker on deep trees.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked