如何在 Windows 中使用 bat 文件删除文件夹和所有内容? [英] How to delete a folder and all contents using a bat file in windows?
本文介绍了如何在 Windows 中使用 bat 文件删除文件夹和所有内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用 bat 文件删除包含所有文件和子文件夹的文件夹.
I want to delete a folder with all files and subfolders using a bat file.
我尝试了以下方法,但它不起作用:
I have tried the following, but it is not working:
@DEL D:PHP_Projects estprojectRelease estfolder*.*
有人可以帮忙吗?
推荐答案
@RD /S /Q "D:PHP_Projects estprojectRelease estfolder"
解释:
移除(删除)一个目录.
Removes (deletes) a directory.
RMDIR [/S] [/Q] [drive:]path RD [/S] [/Q] [drive:]path
/S Removes all directories and files in the specified directory
in addition to the directory itself. Used to remove a directory
tree.
/Q Quiet mode, do not ask if ok to remove a directory tree with /S
这篇关于如何在 Windows 中使用 bat 文件删除文件夹和所有内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文