我希望使用一个批处理文件来删除一个文件夹及其所有文件和子文件夹。
我尝试了以下方法,但似乎并没有生效:
@DEL D:\PHP_Projects\testproject\Release\testfolder*.*
有人能帮忙吗?
我希望使用一个批处理文件来删除一个文件夹及其所有文件和子文件夹。
我尝试了以下方法,但似乎并没有生效:
@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 /q c:\文件所在目录\*
rmdir /s /q c:\文件所在目录\
mkdir c:\文件所在目录\
for
循环中使用 *
:for /d %G in ("D:\testfolder\*") do rd /s /q "%~G"
- yu yang Jian
DEL
命令。 - Jon