Forrest logo
tool overview
On this page you find all important commands for the CLI tool assoc. If the command you are looking for is missing please ask our AI.

assoc

The "assoc" command is a command line tool in Windows that allows you to view or modify file associations. File associations determine how a file is opened or processed based on its extension. By using the "assoc" command, you can see the current file associations set on your system. For example, running "assoc .txt" will display the association for text files.

To modify file associations using "assoc," you can simply enter "assoc" followed by the file extension and the desired program ID. This will associate the file extension with the specified program. For instance, typing "assoc .pdf=AcroExch.Document" will set Adobe Acrobat as the default program for opening PDF files.

In addition to modifying associations, the "assoc" command can help troubleshoot issues related to file associations. By checking the current association using "assoc," you can verify if the correct program is assigned to handle a specific file type. If there are any discrepancies or errors, the "assoc" command provides a straightforward method to rectify them.

Overall, the "assoc" command is an essential tool for managing file associations in Windows, enabling users to view, modify, and troubleshoot associations effectively from the command line interface.

List of commands for assoc:

  • assoc:tldr:0003d assoc: List all associations between file extensions and file types.
    $ assoc
    try on your machine
    explain this command
  • assoc:tldr:0d93b assoc: Set the associated file type for a specific extension.
    $ assoc .${txt}=${txtfile}
    try on your machine
    explain this command
  • assoc:tldr:2074d assoc: View the output of `assoc` one screen at a time.
    $ assoc | ${more}
    try on your machine
    explain this command
  • assoc:tldr:b1e63 assoc: Display the associated file type for a specific extension.
    $ assoc ${-txt}
    try on your machine
    explain this command
tool overview