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

Re: [MacPerl] File::, trying to mirror a folder and notsucceeding;)



At 2:34 AM +0100 1/6/00, Martin D. wrote:
>hi,
>
>I'm trying to copy the contents of a folder preserving the structure. In my
>first attempt I asumed that if I copied a folder the contents would be
>copied aswell, but no, nothing got copied at all so I still can't figure
>out if I was on the right track here...


You should probably go to CPAN and try File::NCopy if you really want 
to do this entirely in Perl.  I'm not sure it works under MacPerl, 
though, but I think it does recursive copies, which is what you seem 
to want.  You'll probably have an easier time fixing it if it doesn't 
work than you will to discover all the pitfalls for yourself.

But in this case there's a better way.  Open Shuck, look under Go -> 
Macintosh Toolbox Modules -> More File Routines.  There's a

	FSpDirectoryCopy SRCSPEC, DSTSPEC, PREFLIGHT, [COPYERRHANDLER]


If all you want is something that works under MacPerl, this is likely 
the best way to do it.  (I still don't know what PREFLIGHT is, 
though.)


>
>I'd be grateful if someone wants to point out where I'm going wrong here!
>
>Thanks,
>/Martin
>

--
Paul Schinder
schinder@pobox.com

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