I've been looking for a way to create files from the Right-Click > New Menu without an extension. The simple way has always been to create a new Text Document, Select All, & Rename it. but that makes it give you a confirmation dialog & adds an extra step. As I do this quite often that is a great inconvenience.
I have found 2 questions that seem to be asking a similar thing, but as marked as Closed without actually answering the question.
So I have pieced together a working method & I wanted to share it, but those questions can no longer be answered. So I will provide my answer with the question: "Is there a better way to do this?" as that can be answered if there's not a better way, or at the very least the information I have pieced together can be found by others looking for the same.
My Method
So to start we need to create a new extension. This is as easy as creating a New Text Document or editing a file you already have & changing the extension to something. For my use
New Text File.blankwas mine.This alone won't add it to the Registry. To do this we need to click on the file & assign a program to open it. You must select
Always Use This App to Open...for it to be added to the Registry. I use Notepad for this purpose, but anything is fine & it should not stick around after you are finished if you use the REG file.Once we have done this there will be an entry in the registry for the extension
HKEY_CLASSES_ROOT\.blankNow we just have to edit the registry to add this to the context menu &, if you so desire, allow it to create the new file without an extension.
Here's a REG file I edited to do this for me. You can create a New text file with something like
add_new_blank_file.reg, so long as it ends in '.reg', & paste this code there.Now there's almost certainly things in there that aren't needed, like the EditFlags & ProgID, but I took this from a file designed to re-add the
New Text Documententry if it was lost. As a new text document is 0kb file I just removed the things that I knew to be unnecessary & leave the rest. One addition I did that I did not include here was changing the default Icon for the.blankfiles. it can be done by adding this to the REG fileUsing your own ICO or DLL file or using one already built-in to windows however you see fit. But it will only show on files with the extension added, not the
NoExtensionfiles created by the Context MenuThis same method can be used without the
[HKEY_CLASSES_ROOT\.blank\ShellNew\Config] "NoExtension"=""to make it create a new file with.blankfrom the context Menu.If you would like the extension to be
.myfeetyou could replace every instance of.blankwith.myfeetRemove this from the REG file (
.blankreplaced with whatever extension you are using)If you want your file to be called
Feet Mapsreplace every instance ofblankfilewith a ProgID you like but this I believe must have no spaces so something likefeetmaps. Then replacewith
Now when you create a new file in the context menu it will be called
New Feet Maps.myfeetSources