Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

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

Re: DOS Script for pop up question ?

From: James J. Morrow <jmorrow_at_warthog.com>
Date: Thu, 11 Jul 2002 13:43:33 -0800
Message-ID: <F001.00495C23.20020711134333@fatcity.com>

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..."
pause

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" (http://www.google.com/search?sourceid=navclient&q=dos+cmd+batch+get) yields this link:

http://www.simtel.iif.hu/pub/msdos/batchutl/

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 redhat.com. 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... http://www.mks.com). The MKS toolkit is required for Oracle Applications 11i on MS Windows NT/2000.

http://freshmeat.net/projects/cygwin/?topic_id=45%2C74 or
http://cygwin.com

"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: http://www.orafaq.com
-- 
Author: James J. Morrow
  INET: jmorrow_at_warthog.com

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: ListGuru_at_fatcity.com (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

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US