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'd like to have a custom icon for the files with extension .extension the same way images do. In the Windows Explorer I see a preview of images as their icon. Instead of having a general icon for .jpg I see the image.

I'd like to do the same with .extension files. These files are plain text, and depending on the text in the file a different icon will show.

share|improve this question
Any specific OS ? – Ankit Mishra Mar 26 '13 at 15:03
My guess is some form of windows, based on the reference to Windows Explorer, but which one is unknown. @Op, I've seen ubuntu do this, but I've never seen a windows icon morph based on contents, except those that have a set of multiple static icons, and whos display is controled by the windows API, like the Recyclebin. – Frank Thomas Mar 26 '13 at 16:07
"depending on the text in the file a diferent icon will show" – Meaning what, that each file's contents would have to be analysed before a custom icon is displayed? And what would the icons show – the actual text in miniature? I'm sure you can write a shell extension for this (doubt one already exists), but not sure how great the performance would be even with multi-threaded code. – Karan Mar 27 '13 at 12:52
What I actually want to do is to display an image that has something to do with the content of the file. Those contents will be written by an application following some rules, so that the app can read it an uderstand it. Then the app will use the text in the file to create an image, the one that shoul be displayed. For example if the contents are: represent = square color = red the app will create an image with a red square. The problem is to use the image as an icon for that file. – MPMP Mar 28 '13 at 0:25
The OS: Win 7. About performance: I'll be working with 3 or 4 files(and I don't mind low speed). About shell extensions , I don't know what they are. – MPMP Mar 28 '13 at 0:32

You must log in to answer this question.

Browse other questions tagged .