Re: removing a resource fork?
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.