Re: A Batch File query



The bad news is, Choice isn't included in the XP commands. The
good news is, however, you can lift it from most any DOS and from
all over the web. And, it's legal to download it from the web.
If you don't have a win95 or 98 laying around you can get it
from, and searching doesn't do it, let me know and I'll send you
a copy of choice.exe. My machine's clean, but you should virus
check it anyway when it arrives if you want me to send it.

There's an excellent DOS group at microsoft.public.msdos-batch,
or something like that.

HTH,
Pop



"Trevor L." <Trevor_L.@Canberra> wrote in message
news:eu2T9qycGHA.1456@xxxxxxxxxxxxxxxxxxxxxxx
I set up this batch file

STEP1:
dir C:\Windows\Temp\*.*
@ECHO Do you want to delete these files or quit?
@ECHO Y. Delete files
@ECHO N. Go to next step
@ECHO Q. Quit
@CHOICE /C:YNQ
IF ERRORLEVEL == 3 GOTO QUIT
IF ERRORLEVEL == 2 GOTO STEP2
del C:\Windows\Temp\*.*

:STEP2
(similar to STEP1 with a different directory)
etc.

The last few lines are
:QUIT
@echo this is the QUIT step
pause

The CHOICE command returned the message
'CHOICE' is not recognised as an internal or external command,
operable program or batch file.

These lines were then printed
C:\Batch Files>IF ERRORLEVEL == 3 GOTO QUIT
this is the QUIT step

C:\Batch Files>pause
Press any key to continue . . .

So ERROLEVEL must have been equal to 3 !!

Is there an alternative to CHOICE under Windows XP ?
--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au



.



Relevant Pages

  • Re: Stop flooding SCI with non-sense repetative posts..
    ... I quit being ... Keep argue with them, the more the merrier. ... >>> Adam a'zAieh yek digarand bla bla bla, ... >>> Above, it was the bad news, the good news is we are ...
    (soc.culture.iranian)
  • Re: commenting out blocks of code
    ... Exit) in every GUI API I know of. ... Ctrl+Q is not reserved for Quit on every platform. ... never used Windows where Exit does not normally have a distinct command key of its own but can be performed with Alt+F4 for single window applications. ...
    (comp.lang.python)
  • Re: Retrieve an array using non-subscript data
    ... The way to stop the loop is with a quit command (which you see later ... retrieve the nodes on a global (or array). ...
    (comp.lang.mumps)
  • Is there something in the water at ABCs World News Now?
    ... Is there something in the water at ABC's "World News Now" that makes ... its male anchors quit left, right, and center, quitting almost as soon ... I know that news anchors quit jobs and quit networs to pursue other ...
    (rec.arts.tv)
  • Re: [SLE] TVTIME 1.0.1
    ... one you cannot figure out how to exit!). ... Then use this command to find the process ID of the ... modified buffer and without asking if you want to do that. ... simple:q command will quit only if the buffer is not modified. ...
    (SuSE)