title: Batch File Choice Command Loops
body: <p>I've written a simple batch file with only a Choice command. The code is as follows:</p>
  
  <pre><code>Choice /C yn /M /t 5 "Do you want to continue"
  If Errorlevel 2 Goto No
  
  
  If Errorlevel 1 Goto Yes
  
  Goto End
  :No
  Echo You selected No
  
  
  Goto End
  :Yes
  Echo You selected Yes
  
  
  :End
  </code></pre>
  
  <p>Problem is when I run it it doesn't wait for input .. It loops through and doesn't stop. I don't know what to do or why it doesn't work. I created a batch file at work with a choice command more complex than this and it works fine. But that file wouldn't work on my computer either. </p>
  
  <p>Also if i type the choice command straight in cmd it works fine but batch file loops</p>
  
  <p>Any suggestions? thanks</p>
  
  <p>here is a link to a video that shows exactly what its doing <a href="http://youtu.be/4TkwlR7yMb8" rel="nofollow">http://youtu.be/4TkwlR7yMb8</a></p>