批处理 中的 ASSOC函数

首页 / 批处理入门教程 / 批处理 中的 ASSOC函数

这是一个批处理命令,用于将扩展名与文件类型(FTYPE)关联,显示现有关联或删除关联。

ASSOC - 语法

assoc  Displays all the file extensions 
assoc | find “.ext  Displays only those file extensions which have the extension ext.

ASSOC - 示例

@echo off 
assoc > C:\lists.txt 
assoc | find “.doc > C:\listsdoc.txt

文件关联列表将路由到文件lists.txt。以下输出显示了运行上述批处理文件后,listsdoc.txt文件中的内容。

链接:https://www.learnfk.comhttps://www.learnfk.com/batch-script/batch-script-assoc.html

来源:LearnFk无涯教程网

.doc=Word.Document.8 
.dochtml=wordhtmlfile 
.docm=Word.DocumentMacroEnabled.12 
.docmhtml=wordmhtmlfile 
.docx=Word.Document.12 
.docxml=wordxmlfile

祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)

技术教程推荐

从0开始学游戏开发 -〔蔡能〕

Nginx核心知识150讲 -〔陶辉〕

Web协议详解与抓包实战 -〔陶辉〕

SRE实战手册 -〔赵成〕

基于人因的用户体验设计课 -〔刘石〕

如何讲好一堂课 -〔薛雨〕

eBPF核心技术与实战 -〔倪朋飞〕

现代React Web开发实战 -〔宋一玮〕

超级访谈:对话道哥 -〔吴翰清(道哥)〕

好记忆不如烂笔头。留下您的足迹吧 :)