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