title: Windows batch file to delete .svn files and folders
body: <p>In order to delete all ".svn" files/folders/subfolders in "myfolder" I use this simple line in a batch file:</p>
  
  <pre><code>FOR /R myfolder %%X IN (.svn) DO (RD /S /Q "%%X")
  </code></pre>
  
  <p>This works, but if there are no ".svn" files/folders the batch file shows a warning saying: "The system cannot find the file specified."
  This warning is very noisy so I was wondering how to <strong>make it understand that if it doesn't find any ".svn" files/folders he must skip the RD command.</strong></p>
  
  <p><strong>Usually using wild cards would suffice</strong>, but in this case I don't know how to use them, because I don't want to delete files/folders with .svn extension, but I want to delete the files/folders named exactly ".svn", so if I do this:</p>
  
  <pre><code>FOR /R myfolder %%X IN (*.svn) DO (RD /S /Q "%%X")
  </code></pre>
  
  <p>it would NOT delete files/folders named exactly ".svn" anymore.
  I tried also this:</p>
  
  <pre><code>FOR /R myfolder %%X IN (.sv*) DO (RD /S /Q "%%X")
  </code></pre>
  
  <p>but it doesn't work either, he deletes nothing.</p>