Here's a VBScript solution that uses a recursive function. ' Global FileSystemObject Set objFSO = CreateObject('Scripting.FileSystemObject') ' Start at the root DoFolder 'c: documentroot ' ' Recursive function Sub DoFolder(strFolder) With objFSO.GetFolder(strFolder) For Each objFile In.Files If objFile.DateCreated.
![How to delete subfolders How to delete subfolders](/uploads/1/2/5/5/125540850/632068095.png)
![Folder Folder](/uploads/1/2/5/5/125540850/152619230.jpg)
Trying to list all folders and sub folders only of a main folder. Do not want the files included in this list. I found this but can not get it to run Dim Mypath as string, MyName as String,iCount. VBS Script to List All Folders and Sub Folders.