Conventions Used
This article contains links to pictures that serve to illustrate some of the explanations for managing file extensions. Because of some slight differences between Windows 95/98/Me and Windows XP, I have inserted double links for each picture. A picture that applies to Windows 95/98/Me is denoted by the link “9x”. A picture that applies to Windows XP is denoted by the link “XP”.
Depending on your screen resolution, some pictures may not display unless you configure Internet Explorer to full screen mode. You can toggle between regular mode and full screen by pressing the F11 key.
What Are File Extensions and How They Are Managed by Windows?
Most every file on a Windows-based computer has a file extension. The file extension serves as a clue to Windows as to the contents of the file and the program to which the file “belongs.” Windows stores information about which file extensions belong to which programs in the system registry. Whenever you install a new program, the installer will usually add information to the registry about the file extensions that are to be associated with it. This association serves two purposes:
In principle, there is no rule as to what file extension(s) a software manufacturer chooses to associate with its application. A program may be associated with any of over 200,000 possible file extensions, including file extensions that may be associated with other programs.
For example, the extension .DOC is used for files created with Microsoft Word. Although any file you come across with this extension was probably created by and for Microsoft Word, this is not always the case. Sometimes a file with the .DOC extension could be a plain text file to be viewed in Notepad or any other text editor.
Nonetheless, some file extensions have special meaning to Windows (and DOS) and by implicit agreement are therefore not used arbitrarily. Such extensions include .COM for DOS program files, .EXE for DOS and Windows program files, and .DLL for dynamic linked libraries which are special program files included with the .EXE files for Windows applications. When you double-click a file with the .EXE or .COM extension, Windows opens the file and executes the program instructions it contains.
Valid Characters for File Extensions
A total of 59 characters may be used for file extensions, consisting of 26 letters (Windows does not distinguish between upper and lower case), ten digits, and several punctuation symbols. Spaces and the following characters may not be used in file extensions:
Symbol |
Description |
\ |
Forward slash |
/ |
Backward slash |
: |
Colon |
* |
Asterisk |
? |
Question mark |
“ |
Double Quotes |
< |
Less than symbol |
> |
Greater than symbol |
| |
Pipe or vertical bar |
Identifying the Most Common File Types/Extensions
A file’s type is simply what a file contains. It could be either a program or data. The file type is usually closely linked to the file’s extensions. “File type” is sometimes used in a sense that is virtually synonymous with “file extension.”
There are many thousands of file extensions in use by Windows programs and probably many more are created every year. It is not practically to discuss every time of file extension, but there are some that are very common and worth knowing about.
Executable Files |
|
.BAT |
DOS batch files |
.COM |
DOS programs |
.EXE |
DOS and Windows programs |
.SCR |
Windows screen savers |
|
|
Text Files |
|
.DOC |
Documents created with Microsoft Word and WordPad |
|
Adobe Acrobat files |
.RTF |
Rich Text Format (portable word processor files) |
.TXT |
Plain text files – associated by default with Notepad |
|
|
Graphics Files |
|
.BMP |
Windows bitmaps |
.GIF |
Graphics Interchange format (compressed graphics) |
.JPEG, .JPG |
Joint Photographic Experts Group |
.PCX |
Another graphics format |
.TIF, .TIFF |
Tagged Image File Format (compressed graphics) |
|
|
Multimedia |
|
.AVI |
Windows animation files |
.MID |
MIDI sound files |
.MOV |
QuickTime movies |
.MP3 |
MP3 sound files |
.RM |
Real |
.WAV |
Windows sound files |
|
|
Others |
|
.PPT |
Microsoft PowerPoint |
.TMP |
Temporary files (usually found in the Windows Temp folder) |
.XLS |
Microsoft Excel |
.ZIP |
Compressed archives (created with WinZip, PKZIP, or other application) |
Opening and Saving Files of Other Types
Most Windows programs support different file extensions, sometimes dozens of different ones. As an example, Microsoft Word supports text, RTF, Excel, WordPerfect, Lotus 1-2-3, and other types of files. To open a file other than a standard Word document, you can select File > Open and click the Files of Type drop-down list to select the file type you are interested in. Likewise, you may be able to save a file to another type—even to a type that is associated with a different program. You may do so by selecting an option such as Save As. (Some programs such as graphics editors and database applications may have an equivalent option such as Export and Import.)
As a side note, the ability to save a file to another type may be handy when you need to share data with someone who does not have the same application as you do. For instance, if I need to share a spreadsheet file that I created in Microsoft Works with someone who does not have Works, I can save the spreadsheet as an Excel file. Likewise, saving a graphics file to a different format may save time in sending file attachments to your friends and family. Some graphics formats such as .JPG require less disk space to store the same image saved in a .BMP file. You can also resize an image to reduce the file size.
Programs That Change Your File Extensions
Some Windows application installers change your file extensions, sometimes without warning. This is supposedly done for the user’s convenience, but the effect is not always desirable. For instance, a Windows graphics application may be capable of opening and editing a few dozen different graphics file types including .BMP, .JPG, and .GIF. If you already have another program associated with a particular file type—a program that you generally prefer because of its ease of use or maybe because it loads much faster—the change can be annoying.
There is no fix that works in every situation. However, some installers are courteous enough to ask before changing your file extensions. Some programs also have a configuration option that allows you to change the file extensions as you please. An example is WinZip, which allows you to customize the associations of nearly 20 different file. You should consult your program’s documentation for more information.
Defining Your Own File Extension
There may be times when you would like to associate a new file extension with one of your applications. You can do this as long as the application supports the file type. For example, any plain text file that you create using Notepad may also be opened using Microsoft Word, WordPad, WordPerfect, or other text editor or word processor. On the other hand, you would not want to associate a non-text file—such as a GIF file—with Notepad.
To create a file with the desired extension, right-click anywhere on your Windows desktop or in any folders in Windows Explorer, select New…Text Document, modify the file extension to your liking and press ENTER to save the change. Windows will ask you to confirm if you really intended to change the file extension. Just click Yes. After the file is created, double-click the file. Provided that the file extension is not already associated with another Windows program, Windows will display a dialog box asking you to select the program to be used in opening the file [9x] [XP].
If you do not see the program listed in the dialog, you may click Other… (Browse… in XP) to navigate to the folder where the application’s file is located. After you find the program file, click Open [9x] [XP]. Lastly, be sure that the option labeled Always use this program to open this file is checked. When you click OK, the new file association will be added to the Windows registry.
Displaying Hidden Extensions for Known Files
By default, Windows hides extensions the extensions of files when viewed in Windows Explorer and on the Windows desktop. Some programs associate themselves with many different file extensions, all of which are associated with the same generic descriptive text. You may view the extension in Windows 95, 98, and ME by right-clicking the file and selecting Properties. A dialog will appear with details about the file under tab labeled General. Look for the field labeled MS-DOS name. There you will see the short 8.3 file name with the extension.
You may unhide all known file types by opening Windows Explorer, selecting Tools > Folder Options…, clicking the View tab, and removing the checkmark to “hide file extensions for known files types.” This will make all file extensions visible and permit you to modify any file extension you choose [9x] [XP].
If you wish to unhide the file extension for only one type of file, you may do so by clicking the File Types tab, scrolling down the list of registered file types to the file type of your choice, double-clicking that type, and clicking the option to “always show extension” [9x] [XP].
While you are in this dialog box, you may wish to modify the available actions for a file type or define new ones. File actions include such things as open and print and appear on the pop-menu whenever you right-click a file. The default action is usually Open which opens the file for viewing and editing. You may change the default action by clicking once to select the action you wish to be the default and then clicking the button labeled Set Default.
You can also do the following to define a new action:
The next time you right-click a file of this type, you should see the new action listed on the pop-up menu. Clicking this new action should invoke the program you selected to perform this action with this file type.
Editing a file action brings up the same dialog box as you will see when creating a new action. You may edit the action’s name or select a different program to perform the action.
Tricks Used by Worms
Worms are malicious software like viruses except that they are self-propagating, usually by co-opting a user’s e-mail software to secretly e-mail themselves to your friends and family. When they do so, they typically include a file attachment with a message to try to entice the recipient to open the file. Unbeknownst to the recipient, the file attachment contains a copy of the worm. When the user opens or executes the attachment by double-clicking it, the worm is activated and installs itself on the victim’s computer and begins the task of e-mailing itself to more users.
The file attachment could be a Word document, executable file (.COM, .EXE, .SCR, .BAT), or a script (.JS or .VBS). In order to fool the user into thinking the file is innocuous, the worm may give the file what appears to be multiple extensions. An example would be a JavaScript file that is named ILOVEYOU.GIF.JS. Windows only recognizes one file extensions, .JS. What looks like a second file extension, .GIF, is treated by Windows as simply part of the file’s name. If the .JS file extension is hidden by Windows, the file attachment will appear in an e-mail message as ILOVEYOU.GIF. Even if the user knows that file attachments can contain worms and viruses, he or she may think that because the extension appears to be “.GIF” that it is only a graphics file and therefore safe to open. (Worms and viruses are not propagated through the transfer of graphics files or other non-executables, because Windows does not attempt to execute them as if they were programs.)
It is for this reason that everyone should be cautions about opening a file attachment, especially if it comes from someone you do not know, or if it appears to come from someone you know but it was not something you expected to receive. As a general rule, I recommend you reply to the apparent sender to confirm to its contents and that they did intend to send it to you. For file attachments from strangers, I recommend you do not open them—just delete the e-mail message.
Where to Find Information About a File Extension
Sometimes you may receive a file from someone with a file extension you do not recognize and which Windows does not know how to open. How can you figure out what to use to open in? One possibility is to ask the sender what type of file it is. Even if it was created with an application you do not have, you may be able to open it with a similar program. An example would be a WordPerfect document (.WPD). If you have another word processor, you can try using it to open the file using the Files of type option.
What if you do not know where the file came from or what application was used to create it? There are a number of resources on the Internet that may come in handy. The following section contains just a few sites I found by doing a search in Google for the phrase “Windows File Extensions”. A number of web sites have lists of hundreds or even thousands of known file extensions, along with information on what program(s) were used to create them. By using these resources, you may at least be able to discover what type of application was used to create it (e.g. word processor, spreadsheet, graphics editor, etc.).
With this information, you may be able to find a special program called a file viewer to view and print the file, or even a converter to convert the file to another file type. It may even be available as a free program. Try searching by specifying the application name followed by the phrase “file viewer” or by searching popular software download sites such as Download.com (www.download.com) and Tucows Downloads (www.tucows.com). As an example, Microsoft has free applications available on its web site for viewing Word, Excel, and PowerPoint files. They are available from the Microsoft Office Download Center at http://office.microsoft.com/downloads/.
Internet Resources for Identifying File Extensions
Windows
File Extensions (List of links to other sites)
http://www.pcin.net/help/articles/fileext.php
Over
10,000 file extensions for Windows, OS/2, Apple, and Unix
http://www.file-ext.com/
"Every
File Format in the World"
http://whatis.techtarget.com/fileFormatA/0,289933,sid9,00.html