批处理 中的 DEL函数

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

此批处理命令删除文件,而不是目录。

DEL - 语法

del [filename]

DEL - 示例

以下示例显示了 del 命令的不同变体。

@echo off 
Rem Deletes the file lists.txt in C:\
del C:\lists.txt 
Rem Deletes all files recursively in all nested directories
del /s *.txt 
Rem Deletes all files recursively in all nested directories , but asks for the 
confirmation from the user first 
Del /p /s *.txt

所有操作均按照批处理文件中的备注执行。

无涯教程网

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

技术教程推荐

技术与商业案例解读 -〔徐飞〕

邱岳的产品实战 -〔邱岳〕

编译原理之美 -〔宫文学〕

Node.js开发实战 -〔杨浩〕

Go 语言项目开发实战 -〔孔令飞〕

说透低代码 -〔陈旭〕

运维监控系统实战笔记 -〔秦晓辉〕

AI绘画核心技术与实战 -〔南柯〕

AI 应用实战课 -〔黄佳〕

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