Howdy, Stranger!

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

Categories

How to identify Invalid input string ?

bholeudaybholeuday Member Posts: 3
Hi,

I have batch file and i want it to identify the invalid user input, it should validate the user input given and should
return the message saying that "You have entered invalid Environment"
Please help how it is possible with below code..

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

Set /P Ename=Enter Environment Name^>

IF '%Ename%'=='wld' GOTO WLD
IF '%Ename%'=='cmd' GOTO CMD
IF '%Ename%'=='cfgcent' GOTO CFGCENT
IF '%Ename%'=='ricdb' GOTO RICDB[/size][/color]

Thanks & Regards

Uday Bhole
Sign In or Register to comment.