|Purpose:||Modify or display relationships between file extensions and file types stored in the Windows registry|
|Format:||ASSOC [/P /R [file...] | [.ext[=[filetype]] /U]|
|file||One or more input files to read association definitions from.|
|.ext||The file extension whose file type you want to display or set.|
|filetype||A file type stored in the Windows registry.|
ASSOC allows you to create, modify, or display associations between file extensions and file types stored in the Windows registry.
ASSOC manages Windows file associations stored under the registry handle HKEY_CLASSES_ROOT, and discussed in more detail under Windows File Associations. If you are not familiar with file associations be sure to read about them before using ASSOC.
If you invoke ASSOC with no parameters, it will display the current associations. If you include a .ext, with no equal sign or filetype, ASSOC will display the current association for that extension.
If you include the equal sign and filetype, ASSOC will create or update the association for extension .ext to refer to the specified file type. The valid file types depend on the contents of your Windows registry. See the FTYPE command or your Windows documentation for additional details.
ASSOC cannot delete an extension from the registry. However, you can create a similar effect by associating the extension with an empty file type using ASSOC .ext=, without the filetype parameter.
ASSOC should be used with caution, and only after backing up the registry. Improper changes to file associations can prevent applications and / or the operating system from working properly.
|/P||Wait for a key to be pressed after each screen page before continuing the display. Your options at the prompt are explained in detail under Page and File Prompts.|
|/R||This option loads an association list from a file. The format of the file is the same as that of the ASSOC display:|
where .ext is an extension, which is to be associated with filetype.
You can load multiple files with one ASSOC /R command by placing the names on the command line, separated by spaces:
assoc /r assoc1.lst assoc2.lst
You can insert comments in the file by prefixing the line with a colon (:).
ASSOC /R will read from stdin if no filename is specified and input is redirected.