Microsoft

Get IT Done: Use the ASSOC command to associate file types

Save time by using the ASSOC command to change associations on several computers in Windows 2000.


Windows 2000 (like other Windows operating systems) associates file extensions with applications to enable files of specific types to be opened by particular applications. If you double-click a .bmp file, for example, it will open in Paint unless you've installed another application that changed the file association. In that case, double-clicking the file opens it in that particular application rather than in Paint. In some cases, you may want to change file associations yourself. For instance, maybe you want those .bmp files to open in Paint again rather than in the application with which they are currently associated.

You can change file associations through the GUI. In any folder, choose Tools | Folder Options. Select the File Types tab and change associations when necessary. If you need to change associations on several computers or simply prefer to use a command console to make the change, you can use the ASSOC command. When used by itself without any parameters, ASSOC displays the current file associations. There are several, so type ASSOC|MORE to view them a page at a time. To view the association for a specific file, type ASSOC with the file extension. The following example would show the association for .bmp files:
ASSOC .BMP

You can also change the association with ASSOC. This example changes .txt files so they're treated as HTML files, and therefore, opened by Internet Explorer rather than Notepad:
ASSOC .TXT=HTMLFILE

Type ASSOC|MORE in order to scan through the file associations to become familiar with the options that are available for associating files.

More Windows 2000 tips
Check out the following TechRepublic articles for more timesaving Windows 2000 tips:

 

Editor's Picks