In Windows, how do I associate an application with a file type?
To ensure that a particular application (e.g., Notepad) handles a
given file type (e.g., a .txt file), follow the
instructions below.
Note: The following web site lists most file extensions and their associated programs: http://filext.com/
Windows Me, 2000, and XP
- Double-click the
My Computericon. This will open a folder that shows all of the drives located on your system.Note: The Windows XP default desktop view and
Startmenu are different from the Windows Classic View (e.g., in Windows 2000). Therefore, navigating to certain items can be different. In the interest of broad applicability, most Knowledge Base instructions assume you are using Classic View. For information about switching your Windows XP default view to Classic View, see In Windows XP, how do I switch to the Windows Classic View, Classic theme, or Classic Control Panel? - From the
Toolsmenu, selectFolder Options....
- In the window that opens, click the
File Typestab, and then clickNew.
- Fill in the "File Extension" box with the file extension (the
letters after the period in the filename) that you want to associate.
- Click the
Advancedbutton. This will open a field for "Associated File Type". You can select the type of file that this extension is associated with from the drop-down list, or allow Windows to specify it. Once this is completed, clickOK. If the files with that extension already have an association, you will get an error that says something like:
If this happens, click"Extension '.txt' is already associated with the File Type Text Document. Do you want to un-associate .txt with Text Document and create a new File Type for it?"
Noand see the section below on editing a file association.
- Click
Advanced, and then clickNew.
- In the
New Actiondialog box, in the "Action" field, type: open - In the next field, type the full path to the application that
should be used to open the file. If you don't know the full path, you
can use the
Browse...button to find it. When you have finished with this, clickOK.
- If all the information is correct, click
Close. You will see the newly created icon in the subwindow. ClickCloseagain.
Any file with the extension you just specified will open in the associated application when you double-click the file.
Editing a file association
To edit a file association, follow the first three steps above to
get to the Folder Options or Options window,
and then follow these steps:
- Search the list under "Registered file types" for the program that
is currently registered to open files with the extension you'd like to
edit. This can be the most difficult step because the actual listing
for the file type under "Registered file types:" may not match the
error you received in step 5 above. You may have to highlight each item
one by one and look at the extension listed under "File type details"
to find the file type associated with the particular extension you
wish to edit.
- When you find the file type, highlight it and click the
Deletebutton.
- Return to step 5 above to continue creating a new file association.
Example of creating a file association
Here is a specific example of how you would associate all files that
have the extension .txt with the Notepad application that
comes with Windows:
- Double-click
My Computer.
- From the
Toolsmenu, selectFolder Options....
- Click the
File Typestab, and then clickNew.
- In the "File Extension" field, enter: .txt
- Click
OK, then clickAdvanced, and then clickNew....
- In the "Action" field, type: open
- In the "Application used to perform action:" field, type: c:\windows\notepad.exe
- Click
OK, and then clickClose.
From now on, all files with the extension .txt will be opened by
the Notepad application.
Windows 95, 98, and NT 4.0
For all versions of Windows 95, 98, and NT 4.0 that have Internet Explorer 4.0 Service Pack 2 and greater installed, follow these steps:
Note: These instructions may not be correct for earlier versions of Internet Explorer. Some buttons may be labeled differently, or you may need to follow slightly different steps.
- Double-click the
My Computericon. This will open a folder that shows all of the drives located on your system.
- From the
Viewmenu, selectFolder Options...orOptions.... (In some versions of Windows 95,Folder Optionswill be located under theToolsmenu .)
- In the window that opens, click the
File Typestab, and then clickNew Type....
- Fill in the first two lines. The "Description of type" should be
the name you want to call this association. The "Associated extension"
should be the file extension (the letters after the period in the
filename) that you want to associate.
- Click
New. If the files with that extension already have an association, you will get an error that says something like:"The extension '.aim' is already in use by the file type 'aimfile'. Choose another extension."
If this happens, see the section below on editing a file association.
- In the
New Actiondialog box, in the "Action" field, type: open - In the next field, type the full path to the application that
should be used to open the file. If you don't know the full path, you
can use the
Browse...button to find it. When you have finished with this, clickOK.
- You will be taken to the previous screen. If all the information
is correct, click
Close. You will see the newly created icon in the subwindow. ClickCloseagain.
Any file with the extension you just specified will open in the associated application when you double-click the file.
Editing a file association
To edit a file association, follow the first three steps above to
get to the Folder Options or Options window,
then follow these steps:
- Search the list under "Registered file types" for the program that
is currently registered to open files with the extension you'd like to
edit. This can be the most difficult step because the actual listing
for the file type under "Registered file types:" may not match the
error you received in step 5 above. You may have to highlight each item
one by one and look at the extension listed under "File type details"
to find the file type associated with the particular extension you
wish to edit.
- When you find the file type, highlight it and click the
Removebutton.
- Return to step 5 above to continue creating a new file association.
Example of creating a file association
Here is a specific example of how you would associate all files that
have the extension .txt with the Notepad application that
comes with Windows:
- Double-click
My Computer.
- From the
Viewmenu, selectOptions....
- Click the
File Typestab, and then clickNew Type....
- In the "Description of type:" field, enter: Text
- In the "Associated extension:" field, enter: .txt
- Click
New.... Then, in the "Action" field, type: open - In the "Application used to perform action:" field, type: c:\windows\notepad.exe
- Click
OK, and then clickClose.
From now on, all files with the extension .txt will be
opened by the Notepad application.
Also see:
- In Windows, how can I prevent a program from starting automatically?
- In Windows, when I double-click an existing Word document, why does it open as a new document?
- In Windows XP, how do I stop Windows from using the Picture and Fax Viewer to open my pictures?
Last modified on September 25, 2006.






