set /p choice /t prompt? correct format
Posted: 01 Feb 2015 14:38
I haven't found a good choice example on the web. I had to format it like this. Can anyone get the message in line with the choice option;
echo Would you like to set folders to exclude?
CHOICE /T 4 /C ync /CS /D n
if errorlevel=3 goto variables
if errorlevel=2 goto backup
if errorlevel=1 goto exclude
echo Something is wrong
I also found selecting the last option "c", errorlevel is both 1,2&3 (sigh)
I would like to use set /p choice.... like;
set /p userinp=Choose a number (1-6):
or
set /P c=Did you run as administrator? Y/N?....
I appreciate your help.
echo Would you like to set folders to exclude?
CHOICE /T 4 /C ync /CS /D n
if errorlevel=3 goto variables
if errorlevel=2 goto backup
if errorlevel=1 goto exclude
echo Something is wrong
I also found selecting the last option "c", errorlevel is both 1,2&3 (sigh)
I would like to use set /p choice.... like;
set /p userinp=Choose a number (1-6):
or
set /P c=Did you run as administrator? Y/N?....
I appreciate your help.