folder icon command line
Hi,
setting a custom item for a folder is easy with the copy/paste method. But I would like to script it.
As far as I have seen, if a custom icon is set for a folder, inside that folder an Icon file is created and the data (the icon itself) is saved in the "resource fork" (0KB for the file in the terminal, but on a smb-server, the file is split into 2 files and the ._Icon file has some 100KB).
But just copying that Icon file over (from a folder, where it is set to the folder, where I want it to show up) with cp or ditto -rsrc doesn't help. The Icon for the folder doesn't change.
Do you know how to change the folder icon in a script (be it bash or Apple script)?
What would be the commands to set a custom icon for a folder?
thanks, kind regards, Herlind
setting a custom item for a folder is easy with the copy/paste method. But I would like to script it.
As far as I have seen, if a custom icon is set for a folder, inside that folder an Icon file is created and the data (the icon itself) is saved in the "resource fork" (0KB for the file in the terminal, but on a smb-server, the file is split into 2 files and the ._Icon file has some 100KB).
But just copying that Icon file over (from a folder, where it is set to the folder, where I want it to show up) with cp or ditto -rsrc doesn't help. The Icon for the folder doesn't change.
Do you know how to change the folder icon in a script (be it bash or Apple script)?
What would be the commands to set a custom icon for a folder?
thanks, kind regards, Herlind
Mac Book Pro, Mac OS X (10.5.7)