In: Categories » » Windows Vista » Working with File Associations, File Extensions, and File Types
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.
Registering File Types and Associations
Windows stores its file types and associations in the Registry. You can dig at them there by using the techniques described in Article 11, but it’s seldom a good idea unless you know exactly what you’re doing. Windows provides tools for viewing and changing file types and associations, so you don’t need to visit the Registry unless you’re trying to create very special effects. When you install a program, the setup routine typically handles the registration of any file types associated with the program. The better setup routines check with you before registering the file types, because they may already be registered to other programs. But more aggressive programs monitor the file types associated with them and try to reclaim them each time you run the program. Audio players particularly MP3 players and video players tend to be the worst offenders on this front, but they’re by no means the only ones; productivity programs can be greedy too. The better programs let you specify whether they should reclaim file types automat- ically and, if so, which file types.
Specifying the File Type of a File
Typically, you specify the file type of a file by adding the appropriate extension or one of the appropriate extensions to it. Most Windows programs use common dialog boxes for Save operations. These common dialog boxes include a Save As Type drop-down list that you use to specify the file type for the file. By default, the program displays the most likely file type in the Save As dialog box. If you don’t explicitly specify the extension for the file, the program adds it. For example, if you save a workbook file in Excel 2007, Excel suggests the Microsoft Excel Workbook file type in the Save As Type drop-down list. If you don’t add an extension to the filename, Excel automatically adds the extension .xlsx, which is linked to the Microsoft Excel Workbook file type.
Finding Out Which File Type a File Is
Your first clue to which file type a file is should be the icon that Windows uses for the file. For example, if Windows shows a stylized Word icon for the file, it’s probably some form of Word document. But icons can be hard to identify, especially when they’re small - and in any case, Windows often uses the same icon for several file types for example, different types of Word documents. To find out which file type a file is, right-click the file in an Explorer window or on the Desktop, and then choose Properties from the context menu. The General page of the Properties dialog box for the file displays its file type. Alternatively, switch the Explorer window to Details view, and then look at the Type column.
Displaying all File Extensions
Windows has an engrossing love/hate relationship with file extensions. It can’t live without them, but it’d sure like to keep them out of sight. Windows needs file extensions so that it knows the actions it can take with a particular file. But Microsoft seems to feel that extensions look ugly, so it makes Windows hide them for as long as possible. This improves the cosmetic look of long filenames and a few other things, but it also has some undesirable consequences. So by default, Windows hides file extensions for registered file types, relying on icons in their various forms thumbnails, tiles, and icons to identify the file type and the extension. In Details view, the Type column in the Explorer windows and dialog boxes displays the file type. And because most every file type is registered either by Windows itself or by the program you install that creates that type of file, all file extensions remain hidden until you change the settings. If you’re comfortable with icons, this is more or less okay. But if not, you can display most file extensions as follows:
1. Choose Organize Folder and Search Options to display the Folder Options dialog box.
2. Click the View tab to display the View page.
3. Clear the Hide File Extensions for Known File Types check box.
4. Click the OK button to close the dialog box.
Understanding the Dangers of Hidden File Extensions
Clearing the Hide File Extensions for Known File Types on the View page of the Folder Options dialog box displays most file extensions - but not all of them. Windows still hides the following file extensions:
.url |
Internet shortcut or URL |
.job |
Task Scheduler Task Object file |
|
| .jse |
JScript Encoded Script file |
.vbe |
VBScript Encoded Script file |
|
| .js |
JScript Script file |
.vbs |
VBScript Script file |
|
| .shs |
Scrap object |
.scf |
Explorer command file |
|
.lnk |
Shortcut |
.wsf |
Windows Script file |
|
As you can see in the list, the LNK file type is used for shortcuts. So if you make Windows display the extension for LNK files, you’ll see a .lnk extension popping up for shortcuts on your Desktop, for shortcuts on your Start menu, and for shortcuts in Explorer windows. The .lnk extensions on the Desktop are entirely harmless, but the extensions on the Start menu are ugly and make it a little more awkward to use. For one thing, the four extra characters - the period and LNK - make each of the cascading menus wider than it would otherwise be. And apart from the visual distraction, it’s conceptually a little distracting to realize that many of the items on the Start menu are plain old shortcuts. It’s not quite like pulling aside the wizard’s curtain, but it gives a feeling that the Start menu is held together by virtual string and sealing wax.
Similarly, the URL file type is for Internet shortcuts and URLs. So if you make Windows display the .url extension, it appears on all Internet shortcuts, including those on your Favorites menus. This too looks ugly, and you can see why Microsoft doesn’t want these extensions displayed.
The problem with not displaying extensions is that some file types can be used to deliver viruses. All the scripting file types - VBE and VBS files, JSE and JS files, WSF files, even SCF files - can perform a wide variety of actions on your computer without consulting you.
No savvy user will run a script that arrives unsolicited: It could be just about anything, and the chances of it doing anything pleasant are small. But, because Windows hides these extensions, a script file can easily masquerade as another file type. For example, say a malefactor creates a script file and names it Latest Britney Clip.mp3.vbs. Because the .vbs extension is hidden, this file shows up as Latest Britney Clip.mp3. If the user double-clicks it, thinking that doing so will start the file playing in their default MP3 player for example, Windows Media Player, the script executes instead. The icon for the script will be wrong, but people often miss this, particularly in Details view in Explorer or when opening an attachment from e-mail. Any antivirus program worth using will catch such scripts, but many people forget to check every file they receive, especially if a file seems to have appealing contents.
Windows Vista doesn’t let you display these always-hidden extensions, so keep using your antivirus program, and check the source of any files you receive that appear suspicious.
Changing the File Type Linked to an Extension
As mentioned earlier, some programs grab file types without asking, either during their setup routines or each time you run them. Other programs ask for permission before grabbing. Either way, you’ll sometimes need to change file types so that they’re associated with the program you want rather than with the greediest program around. To change the file type linked to a particular extension, follow these steps:
1. Right-click a file with that extension, and then choose Properties from the context menu. Windows displays the Properties dialog box for the file. The General page displays information including the type of file the Type of File readout and the program associated with it the Opens With readout.
2. Click the Change button. Windows displays the Open With dialog box.
3. In the Programs list box, select the program with which to open the file:
• Windows breaks down the programs it offers into two categories: Recommended Programs and Other Programs.
• If neither category lists the program you want to use, click the Browse button. Windows displays a second Open With dialog box. This dialog box is an Open dialog box in disguise. Navigate to and select the program, and then click the Open button. Windows closes the second Open With dialog box and returns you to the first Open With dialog box.
4. Click the OK button. Windows closes the first Open With dialog box and links the extension to the file type you selected.
5. Click the OK button. Windows closes the Properties dialog box for the file.
Changing the Program Associated with a File Type
If you find that one program grabs another program’s file types, you may need to change the program associated with a file type. To do so, follow these steps:
1. Choose Start Default Programs to open a Default Programs window.
2. Click the Associate a File Type or Protocol with a Specific Program link to open the Set Associations window.
3. In the list box, select the file type you want to change. By default, this list is sorted alphabetically by file extension name, but you can sort by the Description column or the Current Default column by clicking the appropriate column heading.
4. Click the Change Program button to display the Open With dialog box.
5. If the program you want to use appears in the Recommended Programs list or the Other Programs list, select it. Otherwise, click the Browse button to display a second Open With dialog box, which is a standard Windows Open dialog box given a new name. Navigate to the folder that contains the program you want, select the program, and then click the Open button. Windows returns you to the first Open With dialog box, in which it selects the program you chose.
6. Click the OK button to close the Open With dialog box and apply your choice.
legal notice
Our website is not responsible for the information contained by this article. Web-articles is a free articles resource.
Suggestion: If you need fresh, daily updated content for your website, feel free to use our service. Click here for more information.
Useful tools and features
related articles
The Value of Vista We waited more than five years for Vista. As you may recall, Windows XP was released with much fanfare in October 2001. But instead of the next Windows version shipping in just a couple of years, as originally expected, Microsoft lost its way in the development process. Vista didn’t make it to consumers until early 2007. Was it worth the wait? The short answer is, “Yes.” We believe Vista is a major advance on Microsoft’s previous operating s...
2. Windows Vista Put Some Gadgets in Your Windows Sidebar
Apple users have long been able to take advantage of the Mac OS X Dashboard, and Windows users have been able to download Yahoo Widgets (formerly Konfabulator Widgets). Those things are still available, but now Vista has its own little tools, known as gadgets. Vista gadgets live in the new Windows Sidebar which you can move to the left or right side of the screen by right-clicking it and selecting Properties. Or you can put Gadgets on your Desktop by dragging the little context menu that appears when you hover ...
3. Support for RSS News Feeds in Windows Vista
IE 7.0 includes an easy way to subscribe to news feeds, regularly updated information that sites publish in the format known as Really Simple Syndication (RSS). When a surfer visits a site that publishes one or more news feeds, a square broadcast icon on IE 7’s toolbar changes from grey to orange. Clicking the icon takes you to a page that explains the content of a feed and provides a clickable link that subscribes you. This is a big improvement over previous news feed buttons in other browsers, which formerly ...
4. Thinking of Cheating at Solitaire in Windows Vista
Unfortunately, Vista new Solitaire code seems to have broken one way that neerdowells have cheated at the game for years. This scandalous behavior was first revealed in Windows 3 s all the way back in 1991. As that article explained it, you could click Game - Undo when playing a Draw Three game, and the last three cards you turned over from the deck would go back on the pile. If you then held down the Shift key while clicking the deck, only one card at a time would turn over, allowing you to ...
5. A Quick Overview of All the Versions of Windows Vista
It seems like Windows Vista has a lot more versions than Microsoft has ever offered before. But that isn’t quite true. The Redmond company years ago split Windows XP into almost as many versions as we have today with Vista. You may occasionally hear Vista’s versions referred to as SKUs. This term stands for Stock Keeping Unit. We’ll use the more common terms version and product version throughout this article instead. Here’s a review of the major Windows XP versions (rough...
6. Taking Advantage of Your Ability to Upgrade to Windows Vista
Windows Anytime Upgrade Unlike previous versions of Windows, Vista installs itself with the capability to upgrade from a weaker version to a more-capable version at any time. You simply run the Anytime Upgrade applet, select a source to purchase an upgrade license from, and your PC is quickly enhanced with the more powerful version you’ve selected. _ Vista Home Basic can be upgraded in this way to Home Premium or Ultimate. _ Vista Home Premium and ...
7. Deploying Windows Vista: A Power User`s Toolkit
If you’re an enterprise administrator faced with the prospect of rolling out Windows Vista to hundreds or thousands of desktops around the world, take heart: Microsoft has finally upgraded its deployment tools in dramatic fashion, taking advantage of the componentized architecture of Windows Vista. But these deployment tools aren’t just advantageous to the world’s biggest corporations. If you’re a power user, a tinkerer, or someone who ends up having to reinstall Windows fairly regularly, you mi...
8. What`s New in the Windows Vista User Interface
Gazing upon Windows Vista for the first time, you will immediately be struck by how different everything looks when compared to older Windows versions such as Windows XP and Windows 2000. Now, windows are translucent and glass-like, with subtle animations and visual cues. This new interface leaves no doubt: Windows Vista is a major new Windows version, with much to learn and explore. In this article, we’ll examine the new Windows Vista user interface, called Aero, and explain what you need to ...
9. Windows Vista Aero requirements
As noted earlier, you have to be running an activated version of Vista Home Premium, Business, Enterprise, or Ultimate Edition in order to utilize Windows Vista Aero. Here, activated refers to the Product Activation feature that’s included in Windows Vista, whereby each Windows Vista installation is guaranteed, via a service called Windows Genuine Advantage, to be legitimate and not pirated. Most copies of Windows Vista that are preinstalled on new PCs come pre-activated, so this is a step that many users...
10. Windows Vista Security Features
Although the Windows Vista Aero user interface is the most obvious change to Windows Vista, some of the more important, if less obvious, changes in this new operating system regard security. In this article, we examine the various new security features in Windows Vista. Security and Windows Vista It’s been a tough decade for Windows users. As Microsoft’s operating system entered the dominant phase of its existence, hackers began focusing almost solely on Windows, since that’s where all the user...
