How to associate a file with a program in Windows via CMD

answer

The ability to associate a file type with a program in Windows via the command line is a fairly simple task. In order to do so, the user must use the Windows utility, “assoc”.

This command allows the user to map a file extension to the program that should open it when double clicked. To use this command, open the command prompt and type in the following command:

assoc “[file extension]”=”[program to open it]”

For example, to associate an MP3 file with Windows Media Player, the command would be:

assoc .mp3=”wmpfile”

The “wmpfile” command specifies that Windows Media Player should be the default program to open the file.

In addition to associating a file type with a program, the “assoc” command can also be used to remove a file association. To do this, the user must use the following command:

assoc “[file extension]”=””

For example, to remove the file association for an MP3 file, the command would be:

assoc .mp3=””

Once the command is executed, the file type will no longer be associated with any program.

The “assoc” command is an incredibly powerful tool that can be used to quickly and easily manage file associations in Windows. By using this command, an IT admin can easily control what program opens a file type, or even remove a file association altogether. This can be especially useful when a user has a file type that is not associated with any program, or if the user wishes to change the default program for a file type.

Inquire Now

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Find your next full or part-time role here

ScaleDesk can either help you find your next full time gig or a part time side gig where you can create extra income!

Onboard with us once
Skip HR screening and go to the final interview with with only your resume and a video interview you never have to redo
Get paid electronically every month for the hours you work
We will be your reference even if you work for us once

IT Teams: Use ScaleDesk to augment your team

Schedule Demo