![](/img/trans.png)
[英]How to Delete all contents of a “File with no extension” using windows batch Command
[英]How to delete a folder and all contents using a bat file in windows?
我想使用 bat 文件删除包含所有文件和子文件夹的文件夹。
我尝试了以下方法,但它不起作用:
@DEL D:\PHP_Projects\testproject\Release\testfolder*.*
有人可以帮忙吗?
@RD /S /Q "D:\PHP_Projects\testproject\Release\testfolder"
说明:
移除(删除)目录。
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
del /s /qc:\\where ever the file is\\*
rmdir /s /qc:\\where ever the file is\\
mkdir c:\\where ever the file is\\
del / s / qc:\\其中文件是*
这将删除文件夹和子文件夹中的所有文件,但会保留空子文件夹
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.