• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: removing a resource fork?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: removing a resource fork?


  • Subject: Re: removing a resource fork?
  • From: Hamish Graham <email@hidden>
  • Date: Fri, 25 Jun 2004 22:33:10 +0100

Thanks for the reply,

The reason for doing this is for the files I upload to my website, it's part of an app I wrote to generate photo albums for me. I don't want to transmit anything not needed, ie resource forks etc

hamish


On 25 Jun 2004, at 00:59, Christopher Nebel wrote:

Is there a better way than this to remove a files resource fork?

-------
on zapResource(filePath)
set tmpPath to filePath & ".tmp"
do shell script "cp \"" & filePath & "\" \"" & tmpPath & "\"; mv \"" & tmpPath & "\" \"" & filePath & "\""
end zapResource
--------

Do you just want to zap the resource fork, or do you want all the Mac meta-info dead as well? If the former, then this will work:

do shell script "cat < /dev/null > file/..namedfork/rsrc"

If the latter, then it's hard. Your script will work, though. (Small tip: add a "-p" to the cp command to keep the mod date from changing.) Why do you want to do this?
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: removing a resource fork?
      • From: Doug McNutt <email@hidden>
References: 
 >removing a resource fork? (From: Hamish Graham <email@hidden>)
 >Re: removing a resource fork? (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: Finder window sidebar
  • Next by Date: Re: Filemaker Pro 7 How to get cell contents.
  • Previous by thread: Re: removing a resource fork?
  • Next by thread: Re: removing a resource fork?
  • Index(es):
    • Date
    • Thread