Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have many files with the file extension ".dat". I wish to assign a thumbnail to these files with this extension because the default one is of very low resolution and is disturbing when working. I figured how to change the thumbnail for specific, single files, but I would like to define the file type for all .dat files.

How do I do that?

share|improve this question

migrated from Feb 21 '13 at 17:16

This question came from our site for professional and enthusiast programmers.

Well, that's simple, in the application you're developing, in the dictionary for that document type in your app's Info.plist (if there is no such dict, add that first), you add in the CFBundleTypeIconFile key the name of an icns file in your app resources that provides the icon and…

Oh, wait, you mean, how to do so as a user? As soon as that question is moved to Ask Different, I'll be able to answer that, short of creating a dummy app for that sole purpose (EDIT:) or modifying the source icon in the system or the app to which .dat belongs, which may be used for more than one type and is risky business anyway (END EDIT), I am not aware of any way you can do so.

share|improve this answer
How unfortunate. Well then... thanks anyway. Would it help to know what the system is doing in the background when I change the thumbnail icon manually? Could it be scripted? Still, new .dat files would probably get the old thumbnail. – TMOTTM Feb 20 '13 at 12:12
When you set a custom icon for a file, it gets added to the file metadata. Oh, BTW, I edited the answer slightly. – Pierre Lebeaupin Feb 21 '13 at 12:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .