Re: Deleting resource forks
Re: Deleting resource forks
- Subject: Re: Deleting resource forks
- From: Philip Aker <email@hidden>
- Date: Thu, 11 Jul 2002 01:41:17 -0700
On Wednesday, July 10, 2002, at 06:44 PM, garbanzito wrote:
at 2002 07 10, 16:23 -0400, they whom i call Geoffrey F. Green wrote:
However, I still am interested whether there's a way to delete
a file's resource fork.
technically, i'm not sure the resource for can actually be
deleted. it will always exist, though it may be empty. so
the task is to make the resource fork have no contents. on Mac
OS X this will do it:
It's possible to delete a specific fork. There is a legit call
in Files.h:
EXTERN_API( OSErr )
FSDeleteFork( const FSRef *ref, UniCharCount forkNameLength,
const UniChar *forkName );
However one of the most common ways to accomplish the goal on X
is to use a fork-unaware unix utility (as you suggest). On OS 9,
you can train a zip utility to strip the resource fork when
compressing. Simply unzip the result to get a resource-fork-less
file.
Cheers,
Philip Aker
set my_file to choose file
do shell script "cp /dev/null '" & POSIX path of my_file &
"/..namedfork/rsrc'"
(you can use /rsrc instead of /..namedfork/rsrc, but the former
is deprecated)
mailto:philip@vcn.b
c.ca
_______________________________________________
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.