Assoc


Applies To: Windows Vista,Windows Server 2008

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

For examples of how to use this command, see Examples.

Syntax


Copy Code

assoc [<.ext>[=[<FileType>]]]

Parameters

Parameter

Description

<.ext>

Specifies the file name extension.

<FileType>

Specifies the file type to associate with the specified file name extension.

/?

Displays help at the command prompt.

Remarks

Examples

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


Copy Code

assoc .txt

To remove the file type association for the file name extension .bak, type:


Copy Code

assoc .bak=

Note

Be sure to add a space after the equal sign.

To view the output of assoc one screen at a time, type:


Copy Code

assoc | more

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


Copy Code

assoc>assoc.txt

Additional references

Command-Line Syntax Key