Answers for "How To Create Y/N Question On Batch Script"

0

How To Create Y/N Question On Batch Script

@echo off

:choice
set /P c=Are you sure you want to continue[Y/N]?
if /I "%c%" EQU "Y" goto :somewhere
if /I "%c%" EQU "N" goto :somewhere_else
goto :choice


:somewhere

echo "I am here because you typed Y"
pause
exit

:somewhere_else

echo "I am here because you typed N"
pause
exit
Posted by: Guest on April-02-2022

Code answers related to "How To Create Y/N Question On Batch Script"

Browse Popular Code Answers by Language