How can I change or set the icon for a file or folder, in the terminal, do I need to use a scripting language?
|
|
I almost started a bounty on this, because I didn't manage to change the icon of a folder using @mankoff's answer. But I found a solution. To change folder's icon you don't point These are the modifications to the mankoff's answer:
|
|||||||
|
|
You'll need the Developer Tools installed, and then the following might work. This takes the graphic in
|
|||||||||||
|
|
Check out Download the binary here: http://maxao.free.fr/telechargements/setfileicon.gz After unpacking the file, make it executable:
Then you can use it as follows:
|
||||
|
|
I have a github project where I create AppleScript "droplets" from [shell/bash, python, perl, ruby, etc.] scripts that take file paths as arguments. I wrote this bash function for changing the icon of an folder (because AppleScript bundles are Folders with a .app extension).
Once defined, you call the function with 2 arguments:
or
As you can see the second argument can be an image on your system, or a URL. Also, as I say with every bash script, you should always include this for safety:
|
|||
|
|
