Sublime Forum

Icons in Explorer depending on file extension

#1

I know and use icons in Side Bar, but is it possible to also modify icons in Windows Explorer? In similar manner how video/audio players have various icons f.ex. for .mp3/.mp4/.avi/.mkv files. Right now there is always ST icon shown.
Any idea?

Regards,
iamklepow

1 Like

#2

You do it on Windows as you would do with any other file extension.

Create an entry for the file extension a matching class and the assigned operation and icon file in the Registry

Example for sublime-menu file extension

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.sublime-menu]
@="sublime_text.menu"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\sublime_text.menu\DefaultIcon]
@="C:\\Apps\\Sublime\\myicons.dll,10"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\sublime_text.menu\shell\open\command]
@="C:\\Apps\\Sublime\\sublime_text.exe \"%1\""

You can point to icon resource dlls or and *.ico file directly. You can assign anything you want.

1 Like

#3

or use a third party tool that makes it easier, for example
http://www.nirsoft.net/utils/file_types_manager.html

0 Likes

#4

Yes, but we are working within sublime text and just leave for a short while to import the text to registry :wink: :smile:

0 Likes

#5

Great, thanks, will check that out tomorrow!

0 Likes