Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list a folder's subfolders in addition to it's files

Status
Not open for further replies.

MikeT

IS-IT--Management
Feb 1, 2001
376
US
Given a particular folder, I can display its files, but I want to display its subfolders as well. Is this possible?
 
Code:
Dim objFs as scripting.FileSystemObject
Dim objFolder as scripting.Folder
Dim objFolders as scripting.folders
Dim objFiles as scripting.Files
Set objfs = CreateObject("Scripting.Dictionary")
Set objFolder = objfs.GetFolder(strFoldername)
Set objFiles = objFolder.Files
Set objFolders = objFolder.Subfolders
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top