Copying a file from A to B - not working

Scott Rossi scott at tactilemedia.com
Wed Dec 31 14:16:37 EST 2003


On 12/31/03 1:41 PM, "Karl Becker" <karl at karlbecker.com> wrote:

> I'm attempting to copy a bunch of disparate files from one location to
> another, but it seems like the files themselves aren't quite getting
> duplicated bit-for-bit.  I'm using MetaCard 2.4.3.

If you're going to use read/write, I believe you have to read/write as
binary.  But doesn't 2.4.3 support "put URL"?  If so, you might want to try
using this method instead of read and write.

  put url ("binfile:" & tSourcePath) into url ("binfile:" & tDestPath)

Here's an example:

 on mouseUp
   answer file "Locate file:"
   put it into tSourcePath
   put tSourcePath into tDestPath
   put "_copy" before char -4 of tDestPath
   put url ("binfile:" & tSourcePath) into url ("binfile:" & tDestPath)
 end mouseUp

This should make a copy of file in the same location as the original.  Note
that if you're on a Mac system you should probably set file type and creator
info before making the copy so the copy displays correctly in the finder.

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com



More information about the metacard mailing list