title: How to delete a folder? In VB.Net
body: <p>'' I created a folder like this and it contains many databases. When I'm about to submit again the button there was an error of "Database already exist" i am saying that I'm about to delete the src folder instead of the databases. What should I do then? What code to use?</p>
  
  <pre><code>Dim testPath1 As String = Form1.Dir_folder.Text &amp; "\DDC OS" &amp; "\CARD DECK" &amp; "\" &amp; DateTime.Now.ToString("yyyyMMdd") &amp; "\" &amp; batchFolderName &amp; "\Compare"
  Dim testPath5 As String = Form1.Dir_folder.Text &amp; "\DDC OS" &amp; "\CARD DECK" &amp; "\" &amp; DateTime.Now.ToString("yyyyMMdd") &amp; "\" &amp; batchFolderName &amp; "\Entry1"
  Dim testPath2 As String = Form1.Dir_folder.Text &amp; "\DDC OS" &amp; "\CARD DECK" &amp; "\" &amp; DateTime.Now.ToString("yyyyMMdd") &amp; "\" &amp; batchFolderName &amp; "\Entry2"
  Dim testPath3 As String = Form1.Dir_folder.Text &amp; "\DDC OS" &amp; "\CARD DECK" &amp; "\" &amp; DateTime.Now.ToString("yyyyMMdd") &amp; "\" &amp; batchFolderName &amp; "\Images"
  Dim testPath4 As String = Form1.Dir_folder.Text &amp; "\CBATCH"
  Dim testPath6 As String = Form1.Dir_folder.Text &amp; "\CBATCH" &amp; "\CardDeck" &amp; "\" &amp; DateTime.Now.ToString("yyyyMMdd")
  
  If Not IO.Directory.Exists(testPath5) Then
      MkDir(testPath5)
  End If
  If Not IO.Directory.Exists(testPath1) Then
      MkDir(testPath1)
  End If
  If Not IO.Directory.Exists(testPath2) Then
      MkDir(testPath2)
  End If
  If Not IO.Directory.Exists(testPath3) Then
      MkDir(testPath3)
  End If
  If Not IO.Directory.Exists(testPath4) Then
      MkDir(testPath4)
  End If
  If Not IO.Directory.Exists(testPath6) Then
      MkDir(testPath6)
  End If
  </code></pre>