2
This does it @echo off setlocal enableextensions enabledelayedexpansion set /p num=Enter chars to show between quotes: set /a num=%num%+1 for /f "delims=" %%f in (a.txt) do ( set a=%%f echo !a:~0,%num%!^" ) So, using your example, that's in a.txt So each line starts with a quote, and ther...