回复 10# hacker85
试试- @echo off
- (for /f "delims=" %%a in ('dir /a-d /b /s "A\*.*"') do (
- if not defined .%%~nxa (set .%%~nxa=1) else echo %%~nxa
- ))>$
- (for /f "delims=" %%a in ($) do (
- if not defined _%%a dir /a-d /b /s "A\%%a"&set _%%a=1
- ))>result.txt
- del $
- findstr /n ".*" result.txt&&set/p num=选择序号(空格隔开):
- for %%a in (%num%) do (
- for /f "tokens=1* delims=:" %%b in ('findstr /n ".*" result.txt') do (
- if "%%a"=="%%b" echo del /q "%%c"
- )
- )
- pause
复制代码
|