Manage file type and extension associations with the “assoc” command
If you're new here, you may want to subscribe to Windows Reference RSS feed Thanks for visiting!
Displays or modifies file name extension associations. Used without parameters, assoc displays a list of all the current file name extension associations.
This tool is very useful for managing the relationship or association between file extensions and file types. the syntax is
assoc [.ext[=[fileType]]]
If the plain command “assoc” is entered, you will get a list of what file types correspond to the extensions currently registered on the system. The list can be quite long so it is best to redirect to a file or to pipe to the “more” command so that one full screen at a time can be viewed
assoc > list.txt or assoc | more
If the only parameter is a file extension (including the leading period), the file type for that extension will be given. For example, to see what file type is associated with .txt , enter
assoc .txt
Since the names used for the various file types may not always be obvious, the above can be a useful type of command, In this case, the output would normally be
.txt=txtfile
. . To delete the file type association for the file name extension .xyz (use with care), enter
assoc .xyz=
Another use is to associate a given extension with a certain file type. As an example, to associate the extension .log with type txtfile, enter
assoc .log=txtfile
Note that more than one extension can be associated with a file type. For example, the file type “jpegfile” typically has both the extensions .jpg and .jpeg associated with it. Also note that it is possible to create your own file extensions and to associate them with a filetype.
Random Posts
Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically each day to your feed reader.






No comments yet.
Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>