J Jason Feb 10, 2004 #1 I need a script that will delete folders within a folder. Not files withing a folder.
M MS Newsgroups Feb 11, 2004 #2 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
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