Deleteing a folder within a folder

  • Thread starter Thread starter Jason
  • Start date Start date
This should do the trick..

'***********
Dim oFSO
Dim oFolder
Dim sFolder
Dim item

sFolder="c:\MyRootFolder"
Set oFSO=CreateObject("scripting.filesystemobject")
Set oFolder=oFSO.GetFolder(sFolder)

For Each item In oFolder.SubFolders
item.delete
next
'***********

Regards

Niclas Lindblom
 
Back
Top