echo please enter y/n: set /p flag= ::echo %flag% if /i %flag% == y (echo "y")^ else (echo "stop the procedure!")