本帖最后由 aloha20200628 于 2024-10-21 17:16 编辑
回复 4# jelly_770
当前目录和其各个子目录中符合匹配条件的目标文件*.brd均被删除...- @echo off &setlocal enabledelayedexpansion
- (dir /b/s/ad &echo,%cd%)>all.d
- for /f "delims=" %%d in (all.d) do if exist "%%d\*.brd" (
- set "lastF=" & for /f "skip=1 delims=" %%F in ('dir /b/a-d/od/tw "%%d\*.brd" ') do (
- if not defined lastF (set "lastF=%%d\%%F") else (del/q "!lastF!"&set "lastF=%%d\%%F")
- )
- )
- del/q "all.d"&endlocal&pause&exit/b
复制代码
|