How to change the icon of text files?
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
How to change the icon of text files?
TextPad 9 is my default application for editing text files. I want to change the icon of the text files to make it the same icon that TextPad shows for the app itself. The icon that appears for the text files is currently:
Last edited by AmigoJack on Tue Oct 17, 2023 8:14 am, edited 1 time in total.
Reason: moved from wrong "HOW-TO" forum; inlining attachment; adding question mark
Reason: moved from wrong "HOW-TO" forum; inlining attachment; adding question mark
Re: How to change the icon of text files?
That's a question about Windows, not TextPad. In current versions this is almost impossible to define per dialogs (while earlier Windows versions made this easier). What works for all versions: using the Registry.
- Start the Registry editor (WIN+R, enter regedit, hit OK)
- Browse to \HKEY_CLASSES_ROOT\.txt and read the value for the name (Default) - it may be something like txtfile or Textpad.txt
- Browse to a key that has that read value in its path, f.e. \HKEY_CLASSES_ROOT\Textpad.txt\DefaultIcon (or \HKEY_CLASSES_ROOT\txtfile\DefaultIcon
- Change the value of (Default) to "C:\Program Files\TextPad 9\TextPad.exe",0 (including quotation marks, including comma zero). The file path (C:\Program Files\TextPad 9\) must match where your installation resides. The ,0 part means the first icon in that EXE file. You can browse all available icons of an/that EXE file by
- right clicking on such a shortcut (f.e. the TextPad shortcut in your start menu or on your desktop),
- choosing "Properties"
- using the tab "Shortcut", clicking the button "Change Icon".
- In that dialog all available icons are displayed - you just have to count from zero instead of one to select which icon you want.