Missing Old DOS command HELP!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello there.. I am looking for help in creating Batch
files.

In older versions of DOS and I think maybe even some of
the other versions of Windows there was a command for
batch programs called "CHOICE" which let you create a
sort of menu driven batch file.

I am using WINDOWS XP and would love to create a small
batch file that would give me some sort of menu. Would
anyone know how this is done in Windows XP and what
commands do they use to make a choice selection like the
old "CHOICE" command form DOS 6?

MUCH thanks to anyone able to help me...

So thanks in advance... a BIG thanks
 
An example for a 1 second delay:

TYPE NUL | CHOICE.COM /N /CY /TY,1 >NUL
 
choice.com doesn't exist. (At least not on my copy of XP. Did you add it
from somewhere, Kelly?)
The replacement for this in XP is a variation of the set command:

Set /p answer=Enter choice

You can type set /? for more info.
There is also good info under 'Help and Support' on the Start Menu. They've
made it miserably hard to find however: Search for "Batch" in 'Help and
Support' , click "Batch" under Full-Text Search matches, click
related-topics, click Command-line reference A-Z, where you will find lots
of info on various commands including Set.
 
On Tue, 13 Apr 2004 21:05:22 -0700,
Hello there.. I am looking for help in creating Batch files.
In older versions of DOS and I think maybe even some of
the other versions of Windows there was a command for
batch programs called "CHOICE" which let you create a
sort of menu driven batch file.

CHOICE is a stand-alone program file that you may be able to add to
XP, unless it is rejected as "incorrect version".
I am using WINDOWS XP and would love to create a small
batch file that would give me some sort of menu.

You can download a free program that pops up a Windows dialog box and
returns an info (either an environment variable or ERRORLEVEL) that
you can then test in the .bat statements that follow.

But the really good news is that NT's .bat interpreter has a much
cleaner and more useful way of getting input from the user - trouble
is, I can't recall the details! Look for a post by Torgier (sp?)
which is where I learned about it.

This functionality has always been a majot .BAT weakness (ERRORLEVEL
is an utter pain to use!) and the new syntax was a vast improvement.
Worth questing for and using, if your .bat don't have to run on DOS/9x

Other changes in NT:
- DOS windows don't stay open when finished; end with a Pause
- no DelTree, uses an alternate syntax
- AFAIK, so XCopy
- the WinSet.exe utility crashes in XP (may be a native workalike)


------------ ----- ---- --- -- - - - -
Our senses are our UI to reality
 
On Wed, 14 Apr 2004 09:12:58 -0400, "Code-Curious Mom"
The replacement for this in XP is a variation of the set command:
Set /p answer=Enter choice

*THAT's* the one I was thinking of! Thanks, C-C Mom !!


-------------------- ----- ---- --- -- - - - -
Trsut me, I won't make a mistake!
 
Look for a post by Torgier (sp?)which is where I >learned about it.

Possibly where I learned it too-don't remember. Thanks also to whoever it
was!! You (and OP) are welcome.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top