For just Yes/No use choice without parameters: If used without parameters, choice displays the default choices Y and N.
echo Proceed? choice if NOT %ERRORLEVEL%==1 exit /b
This waits until the user presses Y or N and continues the batch script only if Yes was chosen, which means %ERRORLEVEL% is 1.
It exits the batch script on No and all other cases, even if choice detects an error condition and returns an ERRORLEVEL value of 255, or the user presses CTRL+BREAK or CTRL+C and choice returns an ERRORLEVEL value of 0. See also ss64.com
Edit: With /M parameter one can skip the echo. And for numeric comparisions as is here the case on can use NEQ (assuming Command Extensions are enabled, which they are probably):
choice Proceed? if %ERRORLEVEL% NEQ 1 exit /b
%errorlevel%variable when using theCHOICEcommand.CHOICEcommand: The ERRORLEVEL environment variable is set to the index of the key that was selected from the set of choices. The first choice listed returns a value of 1, the second a value of 2, and so on.set /Pand ofchoicewith their advantages and disadvantages. There is also explained how to evaluate the exit code ofchoicemost efficient in various use cases.