Updated: January 21, 2005

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2


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


assoc [.ext[=[FileType]]]

. ext
Specifies the file name extension.

Specifies the file type with which you want to associate the specified file name extension.

Displays help at the command prompt.

  • 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.


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:


Formatting legend


Format Meaning


Information that the user must supply


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

See Also