[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Autoexec.nt commands



Thanks very much, Robert, for the SET /P example. It could be very helpful
for me. Will play with it.
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
-----------------------------


Harry Binswanger
hb@xxxxxxxx