title: Deleting a folder after a confirmation prompt using a batch file
body: <p>I am attempting to use a batch file to delete a folder, lets say it's called "D:\Pictures\1\Test". I want cmd to confirm that I want to delete the file before it deletes it using a single press of the "Y" key for yes, or the "N" key for no.</p>
  
  <p>The code below prompts me to give a Y/N input and then closes the cmd window; however, it does not delete the file no matter what I press. If I simply type <code>rmdir /s /q "D:\Pictures\1\Test"</code>, it deletes the folder and all containing files without issue, but does not give me a confirmation prompt. Here is my current code. What am I doing wrong?:</p>
  
  <pre><code>CHOICE /C YN /M "Are you sure?"
  IF ERRORLEVEL 2 close
  IF ERRORLEVEL 1 rmdir /s /q "D:\Pictures\1\Test"
  </code></pre>