Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> Re: DOS Script for pop up question ?

Re: DOS Script for pop up question ?

From: James J. Morrow <>
Date: Thu, 11 Jul 2002 13:43:33 -0800
Message-ID: <>

Bob Robert wrote:
> All,
> I have a DOS batch file. In between this script, I
> would like to add user interactive question.
> Ex: Do you want to Continue [Y/N]?
> Once they hit "Y", it will continue rest of the batch
> file.
> Could someone able to help me out as per the above
> requirement?
> Thanks,
> Bob

Well, the simplest answer would be to use the "Pause" command. This assumes, of course, that you don't really care what key they press... simply:

echo "Hit Control-C to abort or..."

Will return:

"Hit Control-C to abort or..."
"Press any key to continue"

I'm pretty sure that the DOS "batch" language doesn't have any "get keystroke" functionality built-in. However, the "CMD" language might.

A search on google for "dos cmd batch get" ( yields this link:

Which has a whole slew of MS-DOS based utilities. I'm sure one of them would have a little *.exe that would read a line or a character from stdin.

Additionally, you could consider "Cygnus for Windows" (aka "Cygwin") available through Cygwin is a Windows tool that gives you Unix functionality. Including some of the popular unix shells for scripting (Bash, Tcsh). This product (free, as in beer) provides the same functionality as the (much more expensive) MKS Toolkit (available from MKS Software... The MKS toolkit is required for Oracle Applications 11i on MS Windows NT/2000. or

"The reasonable man adapts himself to the world: the unreasonable man   persists in trying to adapt the world to himself. Therefore all progress    depends on the unreasonable man." -- George Bernard Shaw

Please see the official ORACLE-L FAQ:
Author: James J. Morrow

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
To REMOVE yourself from this mailing list, send an E-Mail message
to: (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Jul 11 2002 - 16:43:33 CDT

Original text of this message