revCopyFile doesn't copy file type and creator?

Ken Ray kray at
Mon Aug 23 11:43:23 EDT 2004

On 8/23/04 4:43 AM, "Frank Leahy" <frank at> wrote:

> Anyone else notice that revCopyFile doesn't copy the Mac file type and
> creator?

Yes, I use the 'ditto' command through shell. Depending on your OS, you do

10.3 or later:

  ditto --rsrc <pathToFile> <pathToDestFolder>

10.2 and earlier:

  ditto -rsrc <pathToFile> <pathToDestFolder>

Note the extra hyphen (-) for 10.3.

Because I don't like to use quotes at the UNIX command line, I use this
function to return a properly escaped path:

function FormatPath pPath
  put "\" & space & quote & "'`<>!;()[]?#$^&*=" into tSpecialChars
  repeat for each char tChar in tSpecialChars
    replace tChar with ("\" & tChar) in pPath
  end repeat
  return pPath
end FormatPath 


Ken Ray
Sons of Thunder Software
Web site:
Email: kray at

More information about the Use-livecode mailing list