CocoaDev

Edit AllPages

I’ve been wondering about this for a while, and I finally got something to work.

To set an icns file ** to be the custom icon of a file **, do this:

echo “read ‘icns’ (-16455) "**\";" | /Developer/Tools/Rez -o ** /Developer/Tools/SetFile -a "C" **

To set the custom icon on a folder **, do

echo “read ‘icns’ (-16455) "**\";" | /Developer/Tools/Rez -o `printf "**/Icon\r"` /Developer/Tools/SetFile -a "C" **

Hope this helps somebody.

-KenFerry