SoFunction
Updated on 2025-03-10

Assoc displays or modifys filename extension associations

Assoc displays or modifys filename extension associations. If used without parameters, the assoc command will display a list of all current file name extensions associated.

grammar
assoc [.ext[=[filetype]]]

parameter
.ext 
Specify file name extension.
filetype 
Specifies the file type to associate with the specified filename extension.
/? 
Show help in the command prompt.
Comments
If you use spaces after the equal sign, the file type association of a filename extension will be deleted.
Use the ftype command to view the current file type that has defined the open command string.
Use the > redirect operator to redirect assoc to output to a text file.
example
To view the current file type association of the file name extension.txt, type:

assoc .txt

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

assoc .txt=

To view a screen associated with the current file type at a time, type:

assoc | more

To send the assoc output to the file, type:

assoc>