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

Syntax

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

  • To remove the file type association for a file name extension, add 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 remove the file type association for the file name extension .bak, type:

assoc .bak=

Post By Gishore J Kallarackal (2,121 Posts)

Gishore J Kallarackal is the founder of techgurulive. The purpose of this site is to share information about free resources that techies can use for reference. You can follow me on the social web, subscribe to the RSS Feed or sign up for the email newsletter for your daily dose of tech tips & tutorials. You can content me via @twitter or e-mail.

Website: → Techgurulive

Connect