locked
Batch File With NO LABLES RRS feed

  • Question

  • @ECHO OFF
    SET ANS=%1
    IF "%ANS%"=="" GOTO NOTHING
    IF /I "%ANS%"=="Y" GOTO YES
    IF /I "%ANS%"=="N" GOTO NO
    ECHO.
    ECHO INVALID ENTRY, PLEASE REENTER
    GOTO QUIT
    :NOTHING
    ECHO.
    Echo You Entered Nothing
    Echo Please Reenter
    GOTO QUIT
    :YES
    ECHO.
    Echo You Entered Yes
    Echo Whooppee - isn't this exciting!
    GOTO QUIT
    :NO
    ECHO.
    Echo You Entered NO
    Echo How Negative!
    :QUIT@ECHO OFF
    SET ANS=%1
    IF "%ANS%"=="" GOTO NOTHING
    IF /I "%ANS%"=="Y" GOTO YES
    IF /I "%ANS%"=="N" GOTO NO
    ECHO.
    ECHO INVALID ENTRY, PLEASE REENTER
    GOTO QUIT
    :NOTHING
    ECHO.
    Echo You Entered Nothing
    Echo Please Reenter
    GOTO QUIT
    :YES
    ECHO.
    Echo You Entered Yes
    Echo Whooppee - isn't this exciting!
    GOTO QUIT
    :NO
    ECHO.
    Echo You Entered NO
    Echo How Negative!
    :QUIT

    Tuesday, April 5, 2011 10:56 PM