Filename Extensions

Every operating system needs a mechanism to associate documents with the applications that created them. When you double-click a Microsoft Word document icon, for example, Word launches and opens the document.

In Windows, every file name has a suffix called a filename extension, which is a period followed by three letters. Every time you install a new program, the installer lets Windows know about the file types (the filename extensions) the new application is capable of opening. This information is stored in the Windows 2000 Registry (see page 405).

Here are some common examples:

When you double-click this icon

… this program opens it

Fishing trip.doc

Microsoft Word

Quarterly results.xls

Microsoft Excel

Home Page.htm

Internet Explorer

Agenda.wpd

Corel WordPerfect

A Home Movie.avi

Windows Media Player

Animation.dir

Macromedia Director

Tip

For an exhaustive list of every file extension on the planet, visit http://www.whatis.com; click the link for Every File Format in the World.

Behind the scenes, Windows maintains a massive table that lists every extension and the program that "owns" it. To see this list, choose ToolsFolder Options from the menu bar of any folder window. As shown in Figure 7-6, the Folder Options box appears; click the File Types tab.

Every software program you install must register the file types it uses. The link between the file type and the program is called an association. This dialog box displays the icon for each file type, and an explanation of the selected listing.

Figure 7-6.  Every software program you install must register the file types it uses. The link between the file type and the program is called an association. This dialog box displays the icon for each file type, and an explanation of the selected listing.

Making File Extensions Show Up

It's possible to live a long and happy life without knowing much about these extensions; indeed, because they don't feel very user-friendly, Microsoft designed Windows to hide the extensions on most icons. (See Figure 7-7.) If you're new to Windows, and haven't poked around inside the folders on your hard drive much, you may never even have seen them.

Windows lets you see the filename extensions only when it doesn't recognize them. Left: If Windows recognizes the filename extension on an icon, it hides the extension. Right: You can ask Windows to display all extensions, all the time.

Figure 7-7. Windows lets you see the filename extensions only when it doesn't recognize them. Left: If Windows recognizes the filename extension on an icon, it hides the extension. Right: You can ask Windows to display all extensions, all the time.

Note

Hiding file extensions also makes it harder for you to change one accidentally, which would confuse Windows and maybe even prevent you from opening open the icon to see what's in it.

Some people appreciate the way Windows hides the extensions, because the screen becomes less cluttered and less technical-looking. Others pine for the Windows 3.1 days, when every icon appeared with its suffix.

To make Windows show the file suffixes on all icons, choose ToolsFolder Options from any folder window's menu bar. In the Folder Options dialog box, click the View tab. Turn off "Hide file extensions for known file types," and then click OK.

Hooking up a file extension to a different program

Windows comes with several programs (Notepad and WordPad, for example) that can open text files (whose file extension is .txt). And Windows also comes with several programs (Paint, Imaging, Internet Explorer) that can open JPEG picture files (whose file extension is .jpg). So how does it decide which program to open when you double-click a .txt or .jpg file?

Windows comes with its own extension-to-application pairing list, shown in Figure 7-6. But at any time, you can reassign a particular file type (filename extension) to a different application.

To do so, right-click the file's icon and choose Open With from the shortcut menu. Windows presents the Open With dialog box shown in Figure 7-8. Just find, and double-click, the name of the program you want to open this kind of file from now on.

Scroll through the list of installed programs to select the one that can handle the file you're trying to open. If you select the option to use this program for every file with the same extension, you create a file association that will handle similar files in the future.

Figure 7-8.  Scroll through the list of installed programs to select the one that can handle the file you're trying to open. If you select the option to use this program for every file with the same extension, you create a file association that will handle similar files in the future.

As you do so, be sure to check the status of the checkbox below the list; it says, "Always use this program to open these files." If that checkbox is on, then all files of this type (.jpg, for example) will open in the newly selected application from now on. If the checkbox is off, then the new application will open only this .jpg file, only this once.

Tip

This technique is a good cure if you've made a file association by mistake, or when a new program you install performs a "power grab," claiming a particular file type for itself without asking you.

Creating your own file associations

Every now and then, the dialog box shown in Figure 7-8 appears unbidden. It comes up automatically whenever you try to open a file whose extension Windows doesn't recognize. Maybe you've tried to double-click a document created by an old DOS program that doesn't know about the Windows file-association feature, or maybe your company's programmers wrote a custom application that Windows doesn't yet know about.

In any case, there are two ways to teach Windows to use a particular application whenever you open similar documents in the future. First, you can open the Folder Options dialog box shown in Figure 7-6; the New button lets you associate the mystery document with an application of your choice.

Tip

It's sometimes useful to associate a particular document type with a program that didn't create it. For example, if you double-click a text file, and the Open With dialog box appears, you might decide that you want such documents to open automatically into WordPad. (It's fine to set up a single application to open documents of different types—text files, Word files, and RTF files, for example.)

Second, you can use the Open With dialog box shown in Figure 7-8; this method is often simpler, because all you have to do to summon this dialog box is to double-click the mystery file.

If the program you want to take over the document-opening task doesn't show up in this list, click Other in the Open With dialog box. Windows opens the window shown in Figure 7-9. Double-click the name of the application you'll want to open this file type. Add a description of this file type, if you like.

Use this window (a cousin to the Open File dialog box pictured above) to search your system and locate the application you want to associate with a specific file type. Double-click a folder to open it, or use the icons on the left side of the window to move to a particular location. Here, a mysteriously compressed downloaded file is about to be opened by a decompression program called Aladdin Expander.

Figure 7-9. Use this window (a cousin to the Open File dialog box pictured above) to search your system and locate the application you want to associate with a specific file type. Double-click a folder to open it, or use the icons on the left side of the window to move to a particular location. Here, a mysteriously compressed downloaded file is about to be opened by a decompression program called Aladdin Expander.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset