At 10.33 1998.03.30, Chris Nandor wrote: >At 03.44 1998.03.30, nobroin@esoc.esa.de wrote: >>The subject sums my problem up - FileCopy::copy doesn't copy a file >>correctly. It only copies the data fork, not the resource fork, and it >>does not maintain the file type/creator information. (I know this because I >>was first copying to a Netatalk volume, where I can easily see the two >>forks separately. The problem, however, is NOT netatalk related, as it also >>happens when copying from and to a local disk). When this happened, I >>immediately RTFPM and saw syscopy. I'd read of this before but as my >>previous Perl experience has been all Unix based, I hadn't needed it. So, a >>quick mod. to my code to use syscopy and . . . NADA - same result - it just >>copies the data fork. > >#!perl -w >use File::Copy qw(copy); >copy('PowerPudgeII:Desktop Folder:tpc', 'PowerPudgeII:Desktop Folder:tpc2'); > > >This worked fine for me. I added an arbitrary resource to the file, >changed the comment of the file, even added a custom icon, and the new file >was the exact same, same bytes, same resources, same comment, same icon. > >MacPerl 5.1.9r4 PPC, Mac OS 8.1. And you? Ah, I found out the answer. File::Copy uses the Mac toolbox modules. You are using the standard MacPerl 68K, not BigMacPerl or CFM-68K MacPerl, so you don't have the Toolbox Modules. Install CFM-68K, or just install BigMacPerl, and it should work fine. I tested it on my Mac without the toolbox module (Mac::MoreFiles::FSpFileCopy() is used) and the behavior you described was demonstrated on my machine, too. -- Chris Nandor mailto:pudge@pobox.com http://pudge.net/ %PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10 1FF7 7F13 8180 B6B6']) #== New Book: MacPerl: Power and Ease ==# #== Publishing Date: Early 1998. http://www.ptf.com/macperl/ ==# ***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch