There are several files that appear not to have extensions in Windows XP. Perhaps the best known example is the HOSTS file. Files such as the HOSTS file that appear to be “extensionless” actually contain an invisible period “.” — or dot — at the end the file name. It is this invisible dot that will enable us to select a specific program with which to open files with no extensions.

Jump through the hoops

As web developers, we are constantly checking and consulting server-generated error_log files. Like the HOSTS file, the error_log files appear to have no associated extension. In Windows XP, opening extensionless files requires opening the “Open with…” dialogue box and scrolling through a long list of file types. And, although there is a checkbox option within the dialogue box enabling users to “Always use the selected program to open this kind of file,” the option is “greyed out” and useless. Thus opening an extensionless file requires four or five extra “clicks”, as well as the extra time it takes to jump through the hoops. This may not sound like a big deal, but try opening any number of files by this method and the extra clicks begin to add up.

After opening our millionth error_log file using the “Open with” method, we decided to confront the problem and devise a solution. After a bit of research, we were presented with several options: editing the registry, installing software, or tweaking Windows “Folder Options”. After fiddling with the registry and installing some software with no real progress, we decided to try the heretofore unsuccessful “Folder Options” method. Sure enough, armed with an invisible dot and a slight tweak, we were finally able to convince Windows XP to associate extensionless file types with Notepad, our program of choice for such files.

The Solution (Notepad)

Although this solution is relatively risk-free1, requiring no registry editing or software installation, the process is fairly sensitive, requiring careful attention. Below are two methods: the first associates extensionless files with Notepad, while the second does such with WordPad. Both assume you are running on a Windows XP operating system.

Here is the method of associating extensionless file types with Notepad in WinXP:

Open Windows Explorer and go to Tools › Folder Options › File Types. Click the “New” button and type “.txt” in the “File Extension” field. Click on the “Advanced” button and the “Associated File Type” should read “Text Document”. If it is blank, or says something else, close everything out and start over, making sure to follow the steps in order. Finally, in the “File Extension” field, replace the “.txt” with a single dot, “.” Click “OK” and exit. Find or create an extensionless file and check it out.

The Solution (WordPad)

Here is a similar method of associating extensionless file types with WordPad in WinXP:

Open Windows Explorer and go to Tools › Folder Options › File Types. Click the “New” button and type “.txt” in the “File Extension” field. Click on the “Advanced” button and the “Associated File Type” should read “Text Document”. If it is blank, or says something else, close everything out and start over, making sure to follow the steps in order. Open the “Associated File Type” dropdown menu. Scroll down and select “Wordpad Document”. Finally, in the “File Extension” field, replace the “.txt” with a single dot, “.” Click “OK” and exit. Find or create an extensionless file and check it out.