How to set a default editor for files without extension in Microsoft Windows
Quote from HeelpBook on July 29, 2020, 5:45 pmAs in the title, how can I set a default editor (an editing program) for files without extension (for example configuration files from Linux machines) on Windows?
As in the title, how can I set a default editor (an editing program) for files without extension (for example configuration files from Linux machines) on Windows?
Quote from HeelpBook on July 29, 2020, 5:51 pmSometimes, files that have no ending can be treated as text files, and this usually happens on Linux. Instead, usually Windows can continue asking which program to use for such kind of files (correctly, as this OS relies a lot on file extensions to know exactly which program to use).
The solution is to provide a default program for files without extension – and this can be easily done, even without modifying the registry directly.
Open an administrative Command Prompt shell (Windows+Q -> cmd -> Context menu -> Run as administrator) and then enter:
assoc .="No Extension"
Enter:
ftype "No Extension"="[Path to your favorite text editor]" "%1"
Optionally, enter the following to get a nicer default icon for files without extension:
assoc "No extension"\DefaultIcon=%SystemRoot%\system32\imageres.dll,-102
Sometimes, files that have no ending can be treated as text files, and this usually happens on Linux. Instead, usually Windows can continue asking which program to use for such kind of files (correctly, as this OS relies a lot on file extensions to know exactly which program to use).
The solution is to provide a default program for files without extension – and this can be easily done, even without modifying the registry directly.
Open an administrative Command Prompt shell (Windows+Q -> cmd -> Context menu -> Run as administrator) and then enter:
assoc .="No Extension" |
Enter:
ftype "No Extension"="[Path to your favorite text editor]" "%1" |
Optionally, enter the following to get a nicer default icon for files without extension:
assoc "No extension"\DefaultIcon=%SystemRoot%\system32\imageres.dll,-102 |