CODE: [Copy to clipboard]for /f "delims=" %%a in ('findstr /x /n "1234567" abc.txt') do set string=%%a echo\%string%