View Single Post
  #19  
Old May 30th 18, 12:29 PM posted to microsoft.public.windowsxp.general
No_Name
external usenet poster
 
Posts: 627
Default How do you make a batch file accept 1-char keyboard input WITHOUT having to also press carriage return?

On Wed, 30 May 2018 12:15:43 +0100, Java Jive
wrote:

On 30/05/2018 08:11, Ralph Fox wrote:

Be aware that CHOICE is not supported in Windows XP.


Nonsense, as in ...

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\TEMPchoice /?
CHOICE [/C[:]choices] [/N] [/S] [/T[:]c,nn] [text]

/C[:]choices Specifies allowable keys. Default is YN
/N Do not display choices and ? at end of prompt string.
/S Treat choice keys as case sensitive.
/T[:]c,nn Default choice to c after nn seconds
text Prompt string to display

ERRORLEVEL is set to offset of key user presses in choices.


I tried it on my XP and I get the message that CHOICE does not exist
but if I run the DOS 7 version it works so I guess you could just add
CHOICE to your windows32 directory.

http://gfretwell.com/ftp/CHOICE.COM
Ads