Re: A Batch File query
- From: "PopS" <nobody@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 9 May 2006 09:56:31 -0400
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
.
- References:
- A Batch File query
- From: Trevor L.
- A Batch File query
- Prev by Date: Re: Kiosks
- Next by Date: Re: Registry Find & Replace
- Previous by thread: A Batch File query
- Next by thread: Re: A Batch File query
- Index(es):
Relevant Pages
|