Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change an icon for one single file of the specific type?

I know how to change an icon for a whole file type using registry and file type association. I also know how to change an icon for a separate folder using desktop.ini file.

My questions is whether it is possible to change an icon for one specific file, let's say one.doc file?

I cannot find a way doing it, yet some upload programs seem to be able to change an icon of the currently uploaded file, while all other files of this type stay with the standard icon. How do they do it?

I can accept a solution in any language; VB, C++, C# - anything goes, though C# is preferable. Thanks

like image 251
Flot2011 Avatar asked Jan 28 '12 16:01

Flot2011


2 Answers

You can use an IconHandler to allow icons to be customized on a file-by-file basis. Note that shell extensions should not be written in managed code, so C++ is the language of choice here.

Note also that it's highly unusual to be installing an icon handler for another application's file type.

like image 67
Raymond Chen Avatar answered Oct 17 '22 13:10

Raymond Chen


I realize that this thread is pretty old. But for users who have less experience in coding, a good alternative is the following.

  1. Put your target file somewhere.
  2. Create a shortcut item to that file.
  3. Now you can change the icon of the shortcut using its property window.

Just another solution. More of a workaround really.

like image 29
Lost in Knowledge Avatar answered Oct 17 '22 13:10

Lost in Knowledge