[英]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.