Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

auto assign folder icon as folder.jpg

back in the dark ages (when i used widows), i had all my music separated into different folder for each album. In each folder i would put the cover, calling it folder.jpg, and windows would assign the folder icon as that jpg.

now, how can i assign each folder's folder.jpg as the icon for each folder, so that in Finder the folder icon is the cover?

naturally, this would need to be done in an automated manner, as i have thousands of albums.

iMac, Mac OS X (10.5.6)

Posted on Apr 4, 2009 9:40 AM

Reply
9 replies

Apr 15, 2009 5:03 PM in response to woolgatherer

You used to be able to place an image on a folder by
1) copy image to clipboard
2) get info on the folder (select folder, then go to File-->Get Info)
3) clicking on the folder icon in the upper left of the info window
4) pasting image

I think you can still do this in OSX but I haven't tried. Maybe Automator can make this process automatic for you, but again I have not tried.

Apr 15, 2009 6:25 PM in response to Noah Robbin

Noah Robbin wrote:
You used to be able to place an image on a folder by
1) copy image to clipboard
2) get info on the folder (select folder, then go to File-->Get Info)
3) clicking on the folder icon in the upper left of the info window
4) pasting image

I think you can still do this in OSX but I haven't tried. Maybe Automator can make this process automatic for you, but again I have not tried.


Yes that works perfectly in Leopard

Apr 17, 2009 4:47 PM in response to arkman444

Check out this thread
http://discussions.apple.com/thread.jspa?threadID=1105260

In it they reference a set of utilities called osxutils which includes a way to set the icon via the command line. I'm guessing that people in the automator section of the forums can help you with this. It should be possible to run a script that does this automatically for you.

Apr 18, 2009 10:01 AM in response to arkman444

I've played around with this a little (seemed like a fun task to work on).
I'm not sure what the best way to give these instructions is, so if you need more help with any step, please let me know.

WARNING: I've tested this as best I can, but there may be issues. I advise making a backup first and doing a test run.
1) Install osxutils (I used macports to do this)
2) Open Automator and create a new workflow with the following items in order:
Ask for Finder items select Type: Folders
Get folder Contents with Repeat for sub folders selected
Filter Finder Items with File Type is JPEG
Add Thumbnail Icon to Image Files
Run Shell Script
In the shell script you want to pass the input as arguments and paste the following into the text window

for f in $@
do
dir=`echo $f | sed 's/\(. )/./\1/'`
/opt/local/bin/seticon $f $dir
done

3) Save as application and run.

Some things to note:
You may need to change the location of seticon in the shell script if you install osxutils using a method other than macports.

This script adds thumbnails to your jpeg files, this seems like a harmeless side effect to me, but you should know that it is happening.

If you want to remove an icon, get info on it, select the icon and press the backspace key.

Apr 20, 2009 2:37 PM in response to woolgatherer

What if I have more than one JPG in a folder?

It will assign the last jpeg found in the folder as the icon. You can change the filter step to look for a specific file name instead of all jpeg files. For instance, "folder-icon.jpg"

is there a way to easily delete the thumbnails on the jpg files?

I don't know of one, but then again I'm not an expert on Automator.

auto assign folder icon as folder.jpg

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.