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.

Applying custom icons to all files of a type

I used to use ResEdit back int he day - and have used various tools on Mac and Windows to change icons. BUt I am stuggling with a default custom icon option for Mac OS X.


I have a set of farily simply icons for use with a number of file types that I use a lot - csv, psl, pti, tp3, xml, cfr, and others and I would like to always have newly created files get the custom icon.


Ideally this would be based on the extension - and they are not all from the same app.


I am not afraid to use the terminal or edit package contents. Although some of them are windows apps - and I already have a custom set in the virtual machine.


Some of the solutions I have seen out there such as Candy Bar seem to be only for application and folder settings.


In a couple cases - such as the .cfr and .pti - the apps do not have an open method where you can double click on the file and have it open - so I woudl be okay with something like reprogramming TextEdit to have the necessary icons and plist updates. Although when I tried to edit the plist file in TextEdit - all I did was render TextEdit unusable.


any help in the right direction will be appreaciated - I find it very helpful when I create 30 to 40 files ( a group of 5 differnet file types for each option ) to have icons that help me determine which ones I need to run a macro against - and which to send the customer - and which to upload to the vendor - etc.


Also missing the colorful icons in the sidebar and iTunes - as well an Unsanity Haxies - guess what audio feedback does make me more productive or at the very least more certain that the system is behaving as I expect.

MacBook Pro 2011 17, Mac OS X (10.7.2), iPhone 4s 64GB

Posted on Feb 25, 2012 8:14 PM

Reply
19 replies

Mar 20, 2012 5:53 PM in response to macjack

not quite - the path


/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister  -v -f /Applications/TextEdit.app/


ends at


/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/


also editing the TextEdit.app under 10.7 is a bit tricky


I got rtf to work - but that is a built in file type so it was primarily a matter of changing the icns resource and not editing the dict stanzas

Mar 20, 2012 6:01 PM in response to macjack

I've got the coloful sidebar - thanks for that.


I also installed the iTunes resoruce that restores color to the icons - except that it seems to be missing some - new icons that were added to iTunes since the resource bundle was created end up blank. most noticable in the preferences - and of course Apple updarted iTunes abotu every month - so need to put it back often.

Mar 20, 2012 7:45 PM in response to red_menace

Okay - here is more what I am interested in - where you prompt for user input I would rather have this:


set imageFile to POSIX path of ("/Users/matt/Desktop/Set Icons.app/Contents/Resources/rtf.icns")


where some or all of the "/Users/matt/Desktop/Set Icons.app/Contents/Resources/rtf.icns" is replaced by something like name of this application or full path to this applciation.


and where there is some soft of case switch or if then or other consrtuct to distinguish file types since I have multiple to deal with and apply the correct icon to each file based on extension.


the icns files can be inside the application - makes distribution easier that way.


I suppose I could create a separate Automator workflow that checks for each file type and runs a separate applescript - but woudl be far easier I think to run each file through once.


I *might* even need to combine this with my automator/shell script for csv and txt files that does some other stuff as well.


the on run section is not really necesassry in my case as I don't expect this to be run manually.

Mar 20, 2012 11:14 PM in response to Matt Wolanski

I've been working on a version of the Set Icon application that reads icon files from a folder in the bundle. The different handlers are so that the application can be run in different ways, for example from the Finder toolbar or by dropping files onto the application. Is matching the file extension to an icon all that the application will do, or does it need to be more general purpose (e.g. choose from a list of icons, etc)? If you want to send me the icon files (my email is in my profile) I can test and bundle them up.

Applying custom icons to all files of a type

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