title: delete files and folders with VBA (Excel)
body: <p>Good day,</p>
  
  <p>right now I am working on a small Excel VBA Sheet which should us help to prepare data for a CAD release change. All these files are saved on a network drive (server) but I have read and write permissions.
  Everything is working right now except the final cleanup. After processing the files I have to delete the remaining folders and files (thumbs.db). </p>
  
  <p>Unfortunately these files are created on server-side and I can't disable this setting. </p>
  
  <p>I am looking for a VBA code to delete everything (files and folders) within a specific path. All I have right now is this: (saveto is coming from another module)</p>
  
  <pre><code>Dim fso As Object
  Set fso = CreateObject("scripting.filesystemobject")
  If Right(saveto, 1) = "\" Then
  MyPath = Left(saveto, Len(saveto) - 1)
  End If
  On Error Resume Next
  fso.deletefile saveto &amp; "\*.*", True
  fso.deletefolder saveto &amp; "\*.*", True
  On Error GoTo 0
  </code></pre>
  
  <p>But with this code I don't get rid of these stupid thumbs.db (which are created as "system files"). Anyone can help me with the last part?</p>
  
  <p>Edit (marked as duplicate)
  I would like to solve it with "filesystemobject"</p>