批处理 中的 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

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

无涯教程网

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

来源:LearnFk无涯教程网

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

技术教程推荐

深入浅出区块链 -〔陈浩〕

数据结构与算法之美 -〔王争〕

数据分析实战45讲 -〔陈旸〕

即时消息技术剖析与实战 -〔袁武林〕

Serverless入门课 -〔蒲松洋(秦粤)〕

职场求生攻略 -〔臧萌〕

大厂晋升指南 -〔李运华〕

说透元宇宙 -〔方军〕

Python实战 · 从0到1搭建直播视频平台 -〔Barry〕

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