CODE: [Copy to clipboard]@echo off for /f "tokens=1* delims=:" %%i in ('findstr /n .* A.TXT') do set var=%%j >B.TXT echo.%var% start B.TXT