Code: Select all
@echo off
for /f "delims=:" %%i in ('findstr /nir /c:"\<exit[ ]*/b\>" /c:"\<goto[ ]*:eof\>" "%~fs0"') do set /a EndOfBatch=%%i
for /f %%i in ('type "%~fs0"^|find /c /v ""') do set /a EndOfFile=%%i
setlocal EnableDelayedExpansion
<"%~fs0" (
for /l %%i in (1 1 %EndOfBatch%) do set /p "="
for /l %%i in (%EndOfBatch% 1 %EndOfFile%) do (
set "line=" &set /p "line="
if defined line echo(!line!
)
)
endlocal
pause
Exit /B
Help=0
Args=0
Set=0
Defaults=0
Options=0
LastRun=0
SaveRun=0
Regards
aGerman