@echo off &setlocal enabledelayedexpansion
mode con cols=100 lines=25
set a=0
for /f "delims=" %%a in ('dir *.txt /s /b') do (
set /a for+=1
set file_!for!=%%~snxa
echo,!for! %%~nxa
)
:input
set /p input="choose the code: "
if not defined file_%input% (cls &goto :input)
for /f "delims=" %%a in (!file_%input%!) do (
set now=%%a
call :read -!now!
echo,
)
pause
exit
:read
set now=%*
:r-1
set now=%now:~1%
if "%now%"=="" goto :eof
set /p=%now:~0,1%<nul&for /l %%a in (1,1,6) do ping -n 1 127.1>nul
goto :r-1