• 0

batch file


Question

1 answer to this question

Recommended Posts

  • 0

This one loops until it gets yes or no:

:AGAIN
set answer=''
set /P answer=Type yes or no:
IF /I '%answer%'=='yes' ( GOTO yes
) ELSE ( IF /I '%answer%'=='no' ( GOTO no
) ELSE ( goto AGAIN ) )
:yes
ECHO you said yes
GOTO end
:no
ECHO you said no
:end

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.