CmdID

CmdID / Commands

assoc

Displays or modifies file name extension associations. Windows commands reference

On Windows

Opens CmdID with your command. It is read in your browser and sent nowhere.

Windows

from the Windows commands reference, CC BY 4.0

Displays or modifies file name extension associations. If used without parameters, assoc displays a list of all the current file name extension associations. NOTE: This command is only supported within cmd.exe and is not available from PowerShell. Though you can use cmd /c assoc as a workaround.

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

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

assoc .txtIdentify

Trips 1 Sigma rule: lowChange Default File Association Via Assoc by Timur Zinniatullin, oscd.community

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

assoc .bak=Identify

Trips 1 Sigma rule: lowChange Default File Association Via Assoc by Timur Zinniatullin, oscd.community

To remove the file type association for the file name extension .jar, type

assoc .jar=Identify

Trips 1 Sigma rule: lowChange Default File Association Via Assoc by Timur Zinniatullin, oscd.community

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

assoc | moreIdentify

Trips 1 Sigma rule: lowChange Default File Association Via Assoc by Timur Zinniatullin, oscd.community

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

assoc>assoc.txtIdentify

Trips 2 Sigma rules: lowCMD Shell Output Redirect by frack113; lowChange Default File Association Via Assoc by Timur Zinniatullin, oscd.community

Associate .log to text files

assoc .log=txtfileIdentify

Trips 1 Sigma rule: lowChange Default File Association Via Assoc by Timur Zinniatullin, oscd.community

Associate files with no extension to text files

assoc .=txtfileIdentify

Trips 1 Sigma rule: lowChange Default File Association Via Assoc by Timur Zinniatullin, oscd.community

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

Windows

from tldr-pages, CC BY 4.0

Display or change associations between file extensions and file types.

List all associations between file extensions and file types

Trips 1 Sigma rule: lowChange Default File Association Via Assoc by Timur Zinniatullin, oscd.community

Display the associated file type for a specific extension

assoc .txtIdentify

Trips 1 Sigma rule: lowChange Default File Association Via Assoc by Timur Zinniatullin, oscd.community

Set the associated file type for a specific extension

assoc .txt=txtfileIdentify

Trips 1 Sigma rule: lowChange Default File Association Via Assoc by Timur Zinniatullin, oscd.community

View the output of assoc one screen at a time

assoc | moreIdentify

Trips 1 Sigma rule: lowChange Default File Association Via Assoc by Timur Zinniatullin, oscd.community