In an ideal world, Windows would know. In an ideal world, it would simply open the file, or, if you needed to take additional steps, it would tell you what those steps would be.
I’m sure by now you realize we don’t live in an ideal world.
We need to learn a little about file types and file associations. Then we’ll know how to answer the question we’re being asked.
Become a Patron of Ask Leo! and go ad-free!
You may notice that the files you use and interact with in Windows1 have names that end with what’s called an “extension”. That’s the set of characters following the last period in the file’s name. For example, the file named “explorer.exe” has an extension of “.exe”.
Extensions tell us what type of file it is. An “.exe” file is an “EXEcutable” file — a file containing a computer program that can be run, or “executed”, on your computer. “explorer.exe” is the file containing the program Windows File Explorer.
There are hundreds, if not thousands, of different types of files. “.doc” and “.docx”, for example, are DOCuments, typically in Microsoft Word and Microsoft Word’s eXtended format, respectively. A “.jpg” is a picture stored in JPEG (Joint Photographic Experts Group) format.
Not every program can open every type of file. Windows needs to know what program(s) can be used to open each specific file type, and if there are more then one, which one should be used by default.
This is called an “association” or “file type association”. For example, the Windows program Notepad is typically associated with the “.txt” extension, which represents a plain text file. Double click on a “.txt”, Windows looks up the associated program — Notepad — and runs it to open the file.
Similarly, if it’s installed, Microsoft Word is generally associated with “.doc” and “.docx” files. Some kind of picture viewing or editing program will be associated with “.jpg” files, and so on. Even “.exe” files have a special association with Windows itself, since it has to know that they’re programs to be run.
If you double-click on a file that has no program associated with its file type, Windows doesn’t know what program to run to open it. “How do you want to open this file?” is the result.
Choosing from a suggestion
To get the dialog box pictured above, I created an “.ask” file that Windows doesn’t know what to do with, and double-clicked on it.
Windows has a fairly large default set of suggestions available; just click on the More apps link.
It’s important to realize there’s no guarantee that these suggestions will work — they’re just programs that can open a large number of different file types. Windows really doesn’t know what to do with the file I’ve double-clicked on, so these suggestions are — to put it bluntly — a shot in the dark.
In my case, one of those suggestions will work just fine: Notepad. So I’ve clicked on that.
The checkbox “Always use this app to open .ask files” is checked, meaning that Windows will remember this as an association in the future. If I click OK this time, then the next time Windows won’t have to ask. It’ll remember that “.ask” files are associated with Notepad.
Clicking on OK makes the association and opens the file in Notepad.
Changing an association
To change (or bypass) an association, start by right-clicking on the file you want to open, and then click on Open with…
This will open the same “How do you want to open this file?” dialog, but with the current default (Notepad in my case) listed.
Click on More apps to display the list of suggestions once again.
This time I’ll click on Wordpad, as it can also open plain text files.
The “Always use this app to open .ask files” is worth comment. I can do either of two things:
- Leave it checked: This will change the association for “.ask” files to be Wordpad permanently. The next time I double-click on an “.ask” file, Wordpad will be used. You would use this to make a permanent change to the program to be used to open these files in the future.
- Uncheck it: This will leave the association for “.ask” files unchanged. The next time I double-click on an “.ask” file, Notepad — the existing association — will continue to be used. You would use this if you only want to open the file in another program this one time.
Regardless of how I set the checkbox, when I click OK, Wordpad is used to open the file.
What if the program you want isn’t listed?
You might notice an additional link in the dialog boxes above: “Look for another app on this PC”.
Click on that, and you’ll be presented with a traditional File Open dialog box. The intent is that you locate the program (the “.exe” file) that you already have installed on your machine that knows how to open the type of file you’re dealing with. Locating that program will require you to know what folder it was installed into; usually a sub-folder of one of the top level “Program Files” folders.
If you don’t have a program already installed on your machine that knows how to open that particular file type, none of this will work. You’ll need to locate such a program and install it on your machine. Typically, doing so will automatically set the association for you.
What if I don’t know what I want?
If you don’t know what a file type represents, or what program might open a specific file type, then it’s time for some research. The short answer is you’ll need to:
- Understand the intent of the file type you’ve been presented with. For example, knowing that (or looking up on the web) “.jpg” is an image file.
- Locate a program that knows how to deal with that file type. That might mean realizing that the already-installed Paint program will work for your images, or that you might need (or simply want) to install and use a different program that’s more suitable to your needs.
I actually experienced this several years ago. I’d asked for some of my medical imaging in digital form for my records, and received the images in what is apparently a medical image standard format. Unfortunately, it’s not a general purpose standard, and I had no way to open the files.
I researched the file extension used2 and learned that the IrfanView image viewing program would display it properly. I installed the program and the association was made for me, after which I could simply double-click on the file.
Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.
I'll see you there!