How to Use the ASSOC Command in Windows Command Line: A Step-by-Step Guide
The ASSOC command is a Windows Command Line tool that allows you to view or change the file type associations in your system. This command is useful when you want to know which program opens a certain file type or when you want to change the program associated with a specific file type.
Here’s how to use the ASSOC command:
Step 1: Open Windows Command Prompt Open the Command Prompt by pressing the Windows key + R, typing “cmd” and hitting Enter.
Step 2: Type “ASSOC” in the Command Prompt Type “assoc” in the Command Prompt and hit Enter. This will display a list of file extensions and their associated programs.
Step 3: Find the File Type You Want to Change Scroll through the list until you find the file extension that you want to change the program association for.
Step 4: Change the Program Association To change the program association for a file extension, type “assoc .<file extension>=<program name>” in the Command Prompt and hit Enter. Replace “<file extension>” with the actual file extension and “<program name>” with the name of the program you want to associate with the file type.
For example, to change the program association for .txt files to Notepad, type “assoc .txt=notepad” in the Command Prompt and hit Enter.
Step 5: Verify the Change Type “assoc” in the Command Prompt again to verify that the program association has been changed successfully.
That’s it! You’ve successfully used the ASSOC command in Windows Command Line to change a file type association. Remember, be careful when changing file type associations, as it can have unintended consequences if you’re not familiar with the programs associated with specific file types.