Eli Grey

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.

8 Comments (add yours)

  • 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 🙂

  • 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

    • 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!!

  • Thank you.

  • Thank u, it worked.. Be sure to run as admin

Leave a Reply