Ask User for Input (String) ??


I have batch file and i want it to ask for the User input (String) like below thing, i know how to do it for a number input but do not know how to do it with String input.
Logic should be like these

[color=Red][size=2]REM Please Enter Environment Details Options are
REM ricdb
REM cfgcent
REM cmd
REM wld

SET choice
set /p choice=Type the Environment to deploy
if not '%choice%'=='' set choice=%choice:~0,1%

IF '%choice%'=='wld' GOTO WLD
IF '%choice%'=='cmd' GOTO CMD
IF '%choice%'=='cfgcent' GOTO CFGCENT
IF '%choice%'=='ricdb' GOTO RICDB
ECHO "%choice%" is not valid please try again[/size][/color]

Choice does not work in these case.
Please help regarding the same.

Thanks & regards

Uday Bhole
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!