title: How to supply console input ( yes / no ) as part of batch file on Windows.
body: <p>I am writing a simple batch file (remove.bat) to remove a directory and all its subdirectories. The file contains the following command- </p>
  
  <pre><code>rmdir /S modules
  </code></pre>
  
  <p>where <em>modules</em> is the name of the non-empty directory. </p>
  
  <p>I get the following message - </p>
  
  <pre><code>C:\...\bin&gt;rmdir /S modules
  modules, Are you sure (Y/N)?
  </code></pre>
  
  <p>How can I supply <strong>through the batch file</strong> the console input "Y" to the Y/N question above? Is there a command that can do this?  </p>