Bearxy 当前离线
上等兵
findstr "FOUND" "1.txt">>2.txt复制代码
评分人数
batman 当前离线
考官
荣誉版主
@echo off for %%a in (*.txt) do ( if exist $ del /q $ for /f "delims=" %%b in ('findstr "FOUND" "%%a"' ) do echo %%b>>$ if exist $ ( move $ "%%a" ) else ( del /q "%%a" ) )复制代码
TOP
applba 当前离线
中校
@echo off set tmpfile=tmp%random%.txt for /r %%a in (*.txt) do ( ( for /f "usebackq delims=" %%b in ("%%~a") do ( echo %%b | find /i "found"))>%tmpfile% if not exist "%%~na.bak.txt" ren "%%~a" "%%~na.bak.txt" move /y "%tmpfile%" "%%~a" )复制代码
fengyun530 当前离线
列兵
lvsehuaxue 当前离线
六级士官
@echo off for %%i in (*.txt) do (findstr /i "found" %%i)>$&&move $ %%i||del /q %%i 复制代码