Can someone fix this?

October 17, 2011 at 02:17:29
Specs: Windows 7
Can someone fix this? Also please tell me what I did wrong... Im trying to teach myself how to script using msdos commands.

@Echo Off
:Begin
CLS
Choice /N /C:What day is it? Monday,Tuesday,Wendsday,Thursday,Friday, Saturday, or Sunday. (Monday, Tuesday, Wendsday, Thursday, Friday, Saturday, or Sunday)%1
IF ERRORLEVEL ==Monday GOTO ONE
IF ERRORLEVEL ==Tuesday GOTO TWO
IF ERRORLEVEL ==Wendsday GOTO THREE
IF ERRORLEVEL ==Thursday GOTO FOUR
IF ERRORLEVEL ==Friday GOTO FIVE
IF ERRORLEVEL ==Saturday GOTO SIX
IF ERRORLEVEL ==Sunday GOTO SEVEN
GOTO END
:ONE
ECHO Anime Schedule For Monday
ECHO None
GOTO END
:TWO
ECHO Anime Schedule For Tuesday
ECHO 1 - Bleach
ECHO NO MORE
GOTO END
:THREE
ECHO Anime Schedule For Wendsday
ECHO NONE
GOTO END
:FOUR
ECHO Anime Schedule For Thursday
ECHO 1 - Naruto
ECHO 2 - Mashiro-Iro Symphony
ECHO 3 - Guilty Crown
ECHO 4 - Boku Ha Tomodachi Ga Suknai
ECHO NO MORE
GOTO END
:FIVE
ECHO Anime Schedule For Friday
ECHO 1 - Fairy Tail
ECHO 2 - Shakugan No Shana
ECHO 3 - Persona 4
GOTO END
:SIX
ECHO Anime Schedule For Saturday
ECHO NONE
GOTO END
:SEVEN
ECHO Anime Schedule For Sunday
ECHO NONE
GOTO END
:END
PAUSE


See More: Can someone fix this?

Report •

#1
October 17, 2011 at 03:17:40
You have to learn batch commands usage; your choice coding is wrong, at prompt type choice /? to get a quick help. You can always get the help by coding /? after any opcode, e.g. if /?.

As tip to check ErrorLevel you need to become from the highest value downward

if ErrorLevel 7 ...
if ErrorLevel 6 ... (NOT if ErrorLevel==N, anyway N must be numeric)

By the way this is NT batch since there is no DOS in Windows 7. More, better you use lowercase while coding.


Report •
Related Solutions


Ask Question