Command Prompt for Windows

File Extension Associations

File name associations link a file extension with a particular program, so that when the file name, including the extension, is entered at the command prompt, the WinOne® Command Prompt knows what program to run. There are many default associations included in Windows. This allows a user to enter a file name with an extension other then .EXC, .EXE, .PIF, .COM, .CMD, .BAT or .WBT, at the command prompt and provided that an association exists for the file extension entered, the respective program will be executed with the filename passed as a parameter.

For example, assume an association exists between all .DOC files and the word-processor WINWORD.EXE. Entering the file name HELLO.DOC at the command prompt will run :-


To create or delete file extension associations use the EXT or EXTENSION command.

Similarly, a single file extension may be associated with many programs, not just one program as is the case above. The user will be prompted to select one of the programs to execute. For example, assume an association exists between .RTF files and the three programs WINWORD.EXE , NOTEPAD.EXE and WRITE.EXE. The following window is displayed :-

Simply, use the mouse and click on the button to execute the desired program.

Not all associations need to be created by the user. Many Windows programs automatically create associations for you, however text mode type programs do not, and they need to be created manually using EXT or EXTENSION command.