On Fri, 10 Sep 1999, Richard Gaskin wrote:

> >To copy a file:
> >
> >open file "the_path_to_copy of file" for [binary]write -- this creates an
> >empty file (copy of file)
> >put url "file/binfile:the_path_to_original file" into var -- puts the
> >contents of original file into a variable
> >write var to file "the_path_to_copy of file"
> >close file "the_path_to_copy of file"
> >
> >To move a file just write the new file(as described) in the desired
> >directory with the same name and delete the original.
> 
> And on Mac, what do we do with the resource fork and Finder attributes?

You could actually copy the resource using the "binfile:" URL type:
put url "binfile:sourcefile" into url "binfile:destfile"
put url "resfile:sourcefile" into url "resfile:destfile"

But you're right that this still doesn't copy the Finder stuff.

> Maybe we should consider suggesting "copy file" and "move file" commands?

Rename file is already in there, though in 2.2.X on the Mac you can
only rename files in the same directory (Windows and UNIX systems can
move files between directories, and this has been added to MacOS for
2.3).

As for workarounds, there are externals that should do this on MacOS,
and you should also be able to do it by sending an AppleEvent to the
Finder, though I don't know the details.
  Regards,
    Scott

> - Richard Gaskin 
>   Fourth World
>   Multimedia Design and Development for Mac, Windows, UNIX, and the Web
>   _____________________________________________________________________
>   [EMAIL PROTECTED]                 http://www.FourthWorld.com
>   US: 800-288-5825         Int'l: 323-225-3717        Fax: 323-225-0716
> 
> 

********************************************************
Scott Raney  [EMAIL PROTECTED]  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...

Reply via email to