Re: Set Document Icon from Command Line
Re: Set Document Icon from Command Line
- Subject: Re: Set Document Icon from Command Line
- From: "Ken Mankoff" <email@hidden>
- Date: Wed, 18 Apr 2007 12:34:26 -0400
I'm sure the code sample there would work, but I've been provided with a much simpler solution using tools already installed. You can see it here:
http://forums.macosxhints.com/showthread.php?p=372418#poststopSummarized as:
sips -i
donorfile.jpg
/Developer/Tools/DeRez -only icns donorfile.jpg > tempicns.rsrc
/Developer/Tools/Rez -append tempicns.rsrc -o recipientfile.xyz
/Developer/Tools/SetFile -a C recipientfile.xyz
-k.
On 4/11/07, Deric Horn <email@hidden> wrote:
Hi Ken,
Take a look at the SetCustomIcon sample code, specifically the routine SaveCustomIcon() available here:
<http://developer.apple.com/samplecode/SetCustomIcon/>
The sample is a bit dated but the concepts still apply,
Deric Horn
Mac OS X Application Technologies Evangelist
Apple Worldwide Developer Relations
email@hidden
>
> Hi List,
>
> I was sent here from the Installer-Dev list with the following question:
>
> Is there a way to set the document icon from the command line? I am able to
> set a folder icon by copying the "Icon^M" file into the directory, but have
> not found a way to do this for a file/document. I know about the 'hidden'
> rsrc/ sub-folder attached to every file, and am comfortable using the Rez and
> DeRez CLI tools, but their man page did not help...
>
> Currently I do it manually by doing a Get Info, then pasting, but would like
> to automate the build + release process.
>
> Any suggestions will be appreciated.
>
> Thanks,
>
> -k.
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Filesystem-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden