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

本文详细解析了DOS命令ASSOC的使用方法,包括如何显示和修改文件扩展名的关联。介绍了ASSOC命令的基本语法,例如如何指定文件类型与扩展名的关联,以及如何删除特定扩展名的关联。
306

被折叠的 条评论
为什么被折叠?



