• 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: Christopher Nebel <email@hidden>
  • Date: Thu, 24 Jun 2004 16:59:09 -0700

On Jun 24, 2004, at 4:32 PM, Hamish Graham 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?


--Chris Nebel
AppleScript Engineering
_______________________________________________
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: Hamish Graham <email@hidden>
References: 
 >removing a resource fork? (From: Hamish Graham <email@hidden>)

  • Prev by Date: removing a resource fork?
  • Next by Date: Re: Second-Time conversion
  • Previous by thread: removing a resource fork?
  • Next by thread: Re: removing a resource fork?
  • Index(es):
    • Date
    • Thread