首先,给出在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),会删除文件的扩展和这个扩展的关联。
还可以参考博客