Associating Files Without File Extensions in Windows

In Windows, you can associate file extensions with programs so they are opened by those programs by default. When you try to open a file without a file extension (most likely a text file made in a linux OS), you are prompted with the dialog to select a program to open the file but the checkbox to make the program you select always open files with the (non-existant) file extension of the current file is disabled. It is still possible to associate all files without file extensions with a program in Windows.

I have made batch files that allow you to set and remove program association on files without file extensions. I have also made two predone batch files for two programs Windows users are very likely to use to open files without file extensions. In the list of batch files after this, you may to check the files out and see that they are safe and will not damage your computer by clicking the “view source” link.

If you are using Windows Vista and do not have the UAC turned off or are not using the “administrator” account, right click on the batch file after you download it and select “Run as administrator”. The batch file for setting a program of your choice for no file extension association asks for a full path to the executable, which you should put in quotes, but it may sometimes work if you just put the name of the program you want to open the files with. An example of when this works is when you type in Firefox or firefox.exe.

Update: It also seems Perishable Press has a Windows XP-only article on doing this which is much more complicated but may be of interest. My way works on Windows XP and Vista (and presumably Windows 93+ but I haven’t tested it on that platform.)

This entry was posted in Uncategorized and tagged , , , , , . Bookmark the permalink.
  • http://nds.cmamod.com cory1492

    Many thanks Elijah, it’s not easy to find someone who knows how to do this – but it is very easy to find many who say it can’t be done. “makefile” opening in npp FTW :)

  • http://haraldkraft.de Harry

    Elijah,
    Thanks a lot for the batch files.
    Would it be possible to apply the association only for certain file names (without extension) such as "README" or "TODO" but leave other files without extension untouched?
    ~Harry

  • http://haraldkraft.de Harry

    OK, pity, but thank you :)

  • http://eligrey.com/ Eli Grey

    Sorry, that can't be done in Windows. In other operating systems that support filetype meta data on files it is though.

  • Vimal Kumar Selvam

    For me, the batch file did not work as is. I had to do "set PATHEXT=.;%PATHEXT%" as said in the help for ftype command.

  • Shira

    Thanks!!

blog comments powered by Disqus