DOS命令--ASSOC的學習

首先,給出在DOS輸入命令help ASSOC後,得到的文本:

Displays or modifies file extension associations

ASSOC [.ext[=[fileType]]]

  .ext      Specifies the file extension to associate the file type with
  fileType  Specifies the file type to associate with the file extension

Type ASSOC without parameters to display the current file associations.
If ASSOC is invoked with just a file extension, it displays the current
file association for that file extension.  Specify nothing for the file
type and the command will delete the association for the file extension.

從上面的文字可以看出,·ASSOC`用來顯示和改變文件擴展(應該就是文件的後綴,如.txt)的關聯。

如果只是在DOS中輸入ASSOC,那麼會顯示很多文件的擴展和文件的關聯。
如果在命令ASSOC後加入擴展(如.txt)那麼會顯示這個擴展(.txt)的關聯,得到的返回結果爲.txt=txtfile.
如果輸入命令ASSOC .txt=,也就是什麼也不加( Specify nothing for the file
type),會刪除文件的擴展和這個擴展的關聯。

還可以參考博客

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章