::win8@cmd
@echo off
setlocal enabledelayedexpansion
set num=0
for /f "delims=" %%a in ('dir /a-d/b/s "D:\111\*.txt"') do (
findstr /i "a1 s1" "%%a">nul&&(
del /q/f "%%~a"
echo %%a >>count.txt
set /a num+=1
)
)
echo !num!>>count.txt
echo end...
pause
你试试。