|
Answer» I'm SURE there is an INPUT type of command for MS-DOS Batch files where I can ask for keyboard input & await a response, and assign Errorlevels to the response.
Nowhere can I FIND any reference to this feature in the section on Batch File Commands.
Please help; I used it a long while ago, but now cannot find it nor even recall enough of it to make it work.
I've looked at CHOICE, but that's not it as I recall.
There was something else specific to to getting input(s)and assigning my own errorlevel(s) to them, then PERHAPS also using them as part of output (e.g. ECHO).
You are indeed RIGHT. There was a program named INPUT that would take prompted input and store it in the environment, not set an errorlevel. An alternative was Answer which did the same thing but ran in DOS and Win9x.
Answer wrote an environment variable named ANSWER. The reason I mention this is if you have multiple inputs, it becomes necessary to set your own variable NAMES to %answer% since the ANSWER variable was overwritten on each execution.
Check it out and beware of unexpected results on XP or Win2000 machines.
Good luck.
|