• 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: Using Terminal to set folder icons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Terminal to set folder icons


  • Subject: Re: Using Terminal to set folder icons
  • From: Andy Lee <email@hidden>
  • Date: Sun, 14 Apr 2002 22:56:54 -0400

At 12:21 PM +1000 4/15/02, Ruben Westerberg wrote:
I wish to create folders with custom icons, from a shell script. Could any one point me in the right direction with regard to where folder icons are stored and how I can access and modify them?

I'm no expert on this matter, but questions about custom icons pop up a lot. This posting from the Omni-dev list may help:

This has been discussed many times... You might want to search the archives
more for details.

First, you'll need to create the 'icns' data structure used for icons from
one or more images. See Icons.h. Or look in the list archives -- I believe
someone posted a utility class for creating icns data from NSImages.

Next, you need to save this data as the file's custom icon. Icon Services or
Icon Utilities may have functions for doing this... I'm not sure. If not,
use the Resource Manager to save the data as an icns resource id -16455 in
the file, and set the "has custom icon" bit in the file's finderInfo flags.

If you're saving a custom icon for a folder or file-wrapper/package, save
the icon resource in an invisible file named "Icon\r" (ends with a carriage
return character) and set the custom icon bit on the folder, not the
invisible file.

There's also info in this list's archives. Go to <http://lists.apple.com/archives/cocoa-dev/2002/Feb/13.html> and look for "PackageMaker and custom folder icons". That seems to be a very promising thread.

--Andy
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Using Terminal to set folder icons (From: Ruben Westerberg <email@hidden>)

  • Prev by Date: Re: Knowing file system changes?
  • Next by Date: Menu items sensitive to modifiers
  • Previous by thread: Using Terminal to set folder icons
  • Next by thread: Gaining temporary access to copy files to the library folder...
  • Index(es):
    • Date
    • Thread