@echo offfor /r %%i in (*.text) do (>>result.txt echo %%~nifor /f "tokens=1 delims=<>" %%j in ('type "%%~i"') do (echo %%j|findstr /i /c:".png">nul&&echo %%j>>result.txt))pause