@echo off
@CHOICE /C:123
if "%ERRORLEVEL" == "1" GOTO one
if "%ERRORLEVEL" == "2" GOTO two
if "%ERRORLEVEL" == "3" GOTO three
:one
set name = input
goto loop
:two
set name = input1
goto loop
:three
set name = input2
goto loop
:loop
for /f "tokens=*" %%a in (%name%.txt) do (
echo %%a
cls
)
pause
the output is
The system cannot find the file .txt
just want to know how to recall the variable in name. this is the first time use batch and dont know what to do. Thanks a lot.
Thanks