Wednesday, May 13, 2009

IF Statment for MS-DOS batch file

SET FrontEnd="false"
SET BackEnd="false"
SET Translations="false"

IF %FrontEnd% == "true" GOTO FrontEnd
IF %BackEnd% == "true" GOTO BackEnd
IF %Translations% == "true" GOTO Translations
GOTO END

:FrontEnd
ECHO I am FrontEnd
GOTO END

:BackEnd
ECHO I am BackEnd
GOTO END

:Translations
ECHO I am Translations
GOTO END

:END

No comments: