2024-05-09 00:50:15
@echo off
for /f "delims=" %%i in ('dir /s/b/ad p10*') do (
rd /s/q "%%~i"
)
exit
这样有没有错
@echo off
for /f "delims=" %%i in ('dir /s/b/ad p10*') do (
rd /s/q "%%~i"
)
for /f "delims=" %%i in ('dir /s/b/aE p10*') do (
rd /s/q "%%~i"
)
exit
你胆大,我的简单可靠办法你不用,偏要别出心裁。
有无错误你自己跑一下就知道了。总不会让我冒险试你的批程序。
基本概念:
For /F 用于处理文件。
FOR /F ["options"] %variable IN (file-set) DO command [command-parameters]
FOR /F ["options"] %variable IN ("string") DO command [command-parameters]
FOR /F ["options"] %variable IN ('command') DO command [command-parameters]
or, if usebackq option present:
FOR /F ["options"] %variable IN (file-set) DO command [command-parameters]
FOR /F ["options"] %variable IN ('string') DO command [command-parameters]
FOR /F ["options"] %variable IN (`command`) DO command [command-parameters]
-----
RD 是删除整个文件夹。
嗯