kabix Posted July 18, 2004 Share Posted July 18, 2004 in dos batch file what code do i need to use to ask a user for YES or NO question? Link to comment Share on other sites More sharing options...
0 kjordan2001 Posted July 18, 2004 Share Posted July 18, 2004 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 More sharing options...
Question
kabix
in dos batch file what code do i need to use to ask a user for YES or NO question?
Link to comment
Share on other sites
1 answer to this question
Recommended Posts