T
Trevor L.
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 ?
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 ?