Networking | Hardware | Software | Multimedia | System | Unix&Linux | MBA

Home>>Unix&Linux>>Command line to change icon

Command line to change icon

g2g4
04-05-2006, 09:13 AM
I need a command line to change the icon of a file or folder to be used in a shell script that could look like this :

$ chngicon myicon.icns myfile myfolder [ ... ]

Anybody knows how to do this?

Thanks.:)

hayne
04-05-2006, 02:09 PM
You could probably do this via the 'Rez' tool that comes with Apple's Xcode Tools. You'd need to know how to get the icon into a resource description file, but maybe 'DeRez' would help in figuring that out.

And have a look at Apple's developer documentation - there is probably something there about how to set a custom icon

Otherwise, you could probably do it via AppleScript "GUI scripting" (see Apple's site for info on this) and the File / Get Info window.
See this old thread for a shell script/AppleScript that opens this window:
http://forums.macosxhints.com/showthread.php?t=10149


 

TOP

Windows Server Outsell
Unix Signals And C++ E

For more info

Unix Signals And C++ E
Windows Server Outsell
bash not using my .bas
Applescript: Hide Proc
help with installing p
Mozilla install from d
ssh - don't want to us
Escaping quotes in Tig
Terminal Keybindings 
JAVA help, please! 

News Archive

Displaying Images on t
Install Office from th
Terminal Problem...? 
cc1plus not executable
desktop icons.. 
at & growlnotify 
unknown terminal type 
scp arbitrary files 
What and why is a 'Dis
permissions already me

Related stories:

What and why is a 'Disk Image"?
permissions already messed up!!
Lost 8 GB of HD space?
Linux On My Mac
su $USER -c $COMMAND fails with exit code 1
Scary message
Sound

Copyright@2004-2005 www.zzcoke.com All Right Reserved

advanced web statistics