[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] How to copy whole folders?



At 14:13 +0100 3/4/99, Martin Wilhelm Leidig wrote:
> Using MacPerl 5.2.0r4 on MacOS D-8.1 I tried to copy folders using
>
> use File::Copy;
> ...
> copy ($InDirName, $OutDirName) or warn ($!);

At 11:01 -0500 3/4/99, Chris Nandor wrote:
> A directory or folder is not a file.  :)

If you want something portable, take a look at File::Find which can do a
file tree walk (recursively down a hierarchy).

If you have access to a copy of the Perl Cookbook, the recipe at p. 329-330
should be modifiable to do what you want to do. (This one "duplicates" the
tree not in real files but in symlinks, aka aliases).
---
      |\      _,,,---,,_       Vicki Brown <vlb@cfcl.com>
ZZZzz /,`.-'`'    -.  ;-;;,_   Journeyman Sourceror: Scripts & Philtres
     |,4-  ) )-,_. ,\ (  `'-'  P.O. Box 1269  San Bruno  CA  94066
    '---''(_/--'  `-'\_) http://www.cfcl.com/~vlb  http://www.macperl.org

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org