ファイル拡張子の関連付けを確認する方法・assocコマンド †assocコマンド使えば簡単にファイルの拡張子の関連付けを確認することができます。 関連記事 †asscコマンドのヘルプ †以下のコマンドを実行しassocコマンドのヘルプを確認してみます。 assoc /?
上記のヘルプを確認すると、assoc .拡張子で関連付けを確認することができるのがわかります。 assocコマンドを実行してみる †引数を渡さずassocコマンドを実行すると以下のようにすべての関連付けが表示されます。 C:\Users\sakura>assoc .386=vxdfile .3g2=QuickTime.3g2 .3gp=QuickTime.3gp .3gp2=QuickTime.3gp2 <省略> .dll=dllfile .doc=Word.Document.8 .docenx=docenxfile .dochtml=wordhtmlfile .docm=Word.DocumentMacroEnabled.12 .docmenx=docmenxfile .docmhtml=wordmhtmlfile .docx=Word.Document.12 .docxenx=docxenxfile .docxml=wordxmlfile .dot=Word.Template.8 .dothtml=wordhtmltemplate .dotm=OpenOffice.org.Dotm .dotx=OpenOffice.org.Dotx <省略> 上記の出力の拡張子.docを見るとファイルの関連付けはWord.Document.8になっているのが確認できます。 拡張子を指定するとことにより同一のことができます。 C:\Users\sakura>assoc .doc .doc=Word.Document.8 C:\Users\sakura>assoc .xls .xls=Excel.Sheet.8 C:\Users\sakura>assoc .ppt .ppt=PowerPoint.Show.8 取得したファイルタイプから関連付けられているアプリケーションを確認する †ftypeコマンドを利用するとassocで取得したファイルタイプ名から拡張子に対応するアプリケーションを確認することができます。 以下の例は、拡張子.docに関連付けられているアプリケーションを取得しています。
|