How to proceed with an interactive batch file?
Eg.,
DO you want to continue? [y/n]
If 'y' Goto Label1
Else Goto Label2
Thanks
How to proceed with an interactive batch file?
Eg.,
DO you want to continue? [y/n]
If 'y' Goto Label1
Else Goto Label2
Thanks
You can use the SET command. The following is the DOS command equivalent of the pseudo code you have above:
set /p choice=Do you want to continue? [y/n]
if '%choice%'=='Y' goto label1
goto label2
Using the choice command, you can specify a set of valid characters and a message:
choice /C YN /M "Do you want to continue?"
if errorlevel 2 goto labelno
if errorlevel 1 goto labelyes