I want to clear all content inside folder,

November 26, 2010 at 03:11:46
Specs: Windows XP
I want to clear all content inside the folder, folder may contain another folder, text files etc...
How can i achive this by VB scripting?

See More: I want to clear all content inside folder,

Report •

#1
November 27, 2010 at 15:19:22
Easiest way is to just delete the folder and recreate it:
Const yourFolder = "some\folder\path"
With CreateObject("Scripting.FileSystemObject")
  .DeleteFolder(yourFolder)
  .CreateFolder(yourFolder)
End With

How To Ask Questions The Smart Way


Report •
Related Solutions


Ask Question