revCopyFile doesn't copy file type and creator?

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


On 8/23/04 4:43 AM, "Frank Leahy" <frank at backtalk.com> 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
this:

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 

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list