我想使用 bat 文件删除包含所有文件和子文件夹的文件夹。
我已经尝试了以下方法,但它不起作用:
@DEL D:\PHP_Projects\testproject\Release\testfolder*.*
有人可以帮忙吗?
最佳答案
@RD /S /Q "D:\PHP_Projects\testproject\Release\testfolder"
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 - 如何在 Windows 中使用 bat 文件删除文件夹和所有内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7331056/