vendredi 28 août 2015

ELSE was unexpected at this time batch file

This is the script:

@echo off

set BSL_Scripter_go="BSL_Scripter.exe"
set BSL_Script=WriteMain_s.txt
set yes=Y
set no=N


::%BSL_Scripter_go% %BSL_Script%

:LABEL1
set /p answer=Have you turned device off?[Y\N]

IF "%answer%"=="%yes%" (GOTO LABEL_DEVICE_RUN
) ELSE (IF "%answer%"=="%no%"(GOTO LABEL1) ELSE (GOTO LABEL_TYPO))

:LABEL_DEVICE_RUN
echo Device is runing..
GOTO END

:LABEL_TYPO
echo UNCORRECT ANSWER, PLEASE TYPE 'Y' or 'N'
GOTO LABEL1

:END

and I got the error:

ELSE was unexpected at this time

Little help?

Aucun commentaire:

Enregistrer un commentaire