Computer and Software Support


Assoc

Updated: January 21, 2005

Displays or modifies file name extension associations. Used without parameters, assoc displays a list of all the current file name extension associations.

Syntax
assoc [.ext[=[FileType]]]
Parameters
.ext
Specifies the file name extension.
FileType
Specifies the file type with which you want to associate the specified file name extension.
/?
Displays help at the command prompt.
Remarks
  • To delete the file type association for a file name extension, create a white space after the equal sign by pressing the SPACEBAR.
  • To view current file types that have open command strings defined, use the ftype command.
  • To redirect the output of assoc to a text file, use the > redirection operator.
Examples
To view the current file type association for the file name extension .txt, type:

assoc .txt

To delete the file type association for the file name extension .txt, type:

assoc .txt=

To view current file type associations one screen at a time, type:

assoc| more

To send the output of assoc to the file Assoc.cfg, type:

assoc>assoc.cfg

Formatting legend

Format Meaning
Italic Information that the user must supply
Bold Elements that the user must type exactly as shown
Ellipsis (...) Parameter that can be repeated several times in a command line
Between brackets ([]) Optional items
Between braces ({}); choices separated by pipe (|). Example: {even|odd} Set of choices from which the user must choose only one
Courier font Code or program output
* *

Some of these terms may be the same or similar to DOS commands. For information on DOS Commands, click here