A free alternative is SET /P, which I use widely in public
scripts. The main difference between SET /P and CHOICE is that
SET /P requires a carriage return after your keystroke, whereas
CHOICE responds immediately to a keystroke. (Often it's an
advantage to have that "confirmation keystroke".) Something
like this:
@echo off
::CHOICE.BAT
::Works w/Win95CMD (KMD.EXE) ergo cross-platform
set /p oui=Respond Yes or No (y/N):
if %oui%!==! set oui=N
if %oui%==y set oui=Y
if %oui%==Y echo OK
if not %oui%==Y echo Not OK
-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------