|
If you double-click a file with an .exe extension, Windows runs the file. If you double-click a file with a .txt extension, Windows opens the file in Notepad or your default text editor. If you double-click a file with an .mp3 extension, Windows starts it playing in Windows Media Player or your default audio player for MP3 files. In each of these examples, your double-click triggers a different action keyed by the file type with which the file extension is associated. This section discusses file extensions, file types, and file associations, how they interact, and how you can customize them to suit your work needs.
What Are File Extensions?
The extension is that part of the filename that appears after the last period in the filename. For example, in a file named September 2008 Report.doc, the extension is .doc. In a file named September 2008 Report. Edited by Bill.doc, the extension is still .doc, even though there’s an earlier period in the filename. A filename doesn’t have to have an extension, but almost all files do, because the extension identifies the file type associated with the file, and the file type contains information on the program and action to use for the file. More on this in a minute. If a file doesn’t have an extension, Windows doesn’t know what to do with it - unless the file is one of the file types designed to have no extension, such as a folder or a DVD. Most extensions are three characters for example, .exe, .doc, or .avi, but some are four characters for example, .jpeg, .mpeg, or .html. Extensions can be up to 200 characters long, but this length is impractical and unnecessary for all but the most specialized purposes. Despite the proliferation of programs and file types, many three-character extensions remain unused and available, though developers who need to create a new file type may prefer a distinctive four-character extension to an unmemorable three-character extension. Users - particularly those who grew up using DOS - tend to be familiar with three-character extensions, so four-character extensions seem strange or a bit wrong. With the Office 2007 programs, Microsoft is gradually transitioning to four-character extensions. For example, Word 2007 documents use the .docx file extension, and Excel 2007 workbooks use the .xlsx file extension.
What Are File Types?
Ideally, each file extension is linked to a file type, a descriptive category with which actions can be associated. For example, the .bmp extension is linked by default to the Bitmap Image file type. The default action associated with the Bitmap Image file type is Open. So when you double-click a file with the .bmp extension, Windows opens the file in the default program Windows Photo Gallery. Other actions associated by default with the Bitmap Image file type are Edit, Print, and PrintTo. Windows comes with preset associations for file types of which it’s already aware, and programs you install add further associations for their file types. Unlike Windows XP, which lets you edit the action associated with a file type, Windows Vista does not let you edit the action. Each extension can be linked to only one file type at a time. If an extension isn’t linked to a file type, when you double-click the file, Windows opens a dialog box telling you the problem and letting you choose between using a Web service to find the correct program or choosing the program from a list of installed programs. Multiple extensions can be linked to a given file type. For example, by default the extensions .mpa, .mpe, .mpeg, .mpg, and .mpv2 are linked to the Movie Clip file type. So when you double-click a file with any one of those five extensions, Windows performs the default action for the Movie Clip file type, which is to open it and play it.
|