Hello Sweeten
Attached are two snipits of code, hope this helps
The following sub reads all the folders in a root folder. Note the use the FSO or file system object. The FSO has a number of properties and methods for working with files and folders, would definetly check it out.
Sub ReadProjects()
'This sub reads all the Folders in the root
Set fso = CreateObject("Scripting.FileSystemObject")
Set Folder = fso.Getfolder(RootPath_)
Set Folder = Folder.SubFolders
i=1
For Each SubFolder In Folder
LstStates.Items.add SubFolder.name,i
i=i+1
Next
End Sub
This next code snipit reads all the files of a certain extention (i.e. LPD,DAT)
Sub ReadProjectFiles()
Dim fso,PathName,LvdNames,GraNames,path
Dim x,y,z
x=1:y=1:z
=1:w=1
Set fso = CreateObject("Scripting.FileSystemObject")
Set Folder = fso.Getfolder(ProjectPath_)
Set Files = Folder.Files
For Each file In files
Select Case file.type
Case "LPD File"
LstGraph.items.add file.name , x
x=x+1
Case "DAT File"
LstData.Items.add file.name , y
y = y+1
Case "LVD File"
LstView.Items.add file.name , z
z = z+1
End Select
Next
Let me know if this is helpful
Tom Ferraro
DIAdem Product Manager
512-683-6841