Find out which application handles a certain file extension


There are times you may wonder which application handles a certain file extension.


In Windows there are really two concepts: File Extension and File Type. File extension can be associated to a file type. Applications work on file type, not directly on file extension.


You can use assoc to find out which file type a file extension is associated with, and ftype to find out which application is registered to handle the file type.


D:\>assoc .htm
.htm=htmlfile


D:\>ftype htmlfile
htmlfile=”D:\Program Files\Internet Explorer\IEXPLORE.EXE” -nohome

Comments (6)

  1. Chris Nahr says:

    Thanks for this entry… this is the first time I’ve seen these very useful commands!

    However, after some digging I found that they are actually built into the command-line shell (cmd.exe).  So there are no programs assoc.exe and ftype.exe on the hard disk, just the commands assoc and ftype.

  2. junfeng says:

    thanks Chris.

    Updated.

  3. David Levine says:

    Thanks for finding these; this is much faster/easier then hunting through the ToolsFolder Options menus for the values.

    These commands also allow you to set the value. For example, if you don’t like the default text editor you can change it like this:

    ftype txtfile=c:SomeDirNotePad2.exe %1

    (you might want to save the old value 1st by:)

    ftype txtfile > OldValue.txt

  4. dotNet Junkie says:

    Thanks, that’s cool. I’ve been programming for many years, but I don’t even know this exists!