Here’s something I never knew was possible. After all these years of using Windows I always thought it was impossible to associate a file without an extension to an application. Why would I want to do this? Simple. Sometimes applications do not add a file extension to files. This seems to be the case when working with files from different operating systems. In my case, I need to inspect some app settings that my phone app is writing and it does not add .xml to the end of the file. The app I use to retrieve these settings prompts for the app I want to open it with AND I have to choose each time. This adds extra steps to my workflow and I almost always open files without extensions with Notepad++. Here’s a simple way of making all files without an extension open in Notepad++ when trying to open them:
- First add Notepad++ to your Path variable.
- Advanced System Settings>Environment>System variables>Path>Edit
- In the Variable value section, add ;C:\Program Files (x86)\Notepad++
- Note that this is for a 64-bit Windows. If you are using 32-bit the Path would be ;C:\Program Files\Notepad++
- Be sure that you add the semicolon before you add the path to Notepad++
- create a .reg file and put the following in:
12345678910Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\.]@=""[HKEY_CLASSES_ROOT\.\shell][HKEY_CLASSES_ROOT\.\shell\open][HKEY_CLASSES_ROOT\.\shell\open\command]@="notepad++.exe %1"
- Then save the .reg file and merge it
Now, when you double-click files without an extension they will be opened with Notepad++ !
If you prefer Sublime Text or Notepad you can change the last line in the reg key. I totally took the lazy way and added it to my Path since I couldn’t figure out how to escape the double quotes for the command. (And by “couldn’t figure out” I mean “didn’t spend more than 60 seconds”.) If you figure out how, leave a comment below. Oh and by the way, this isn’t totally hacky – Microsoft has a KB on it. http://support.microsoft.com/kb/236014
Here’s the .reg key for regular ol notepad (*yawn*)
Windows Registry Editor Version 5.00