|
-
May 17th, 2002, 10:02 PM
#3
Addicted Member
This will work better than my last suggestion. Is it what you were after?
Public Function File_Search_Test() As String
Dim oFS As New Scripting.FileSystemObject()
Dim oFolder As Scripting.Folder
Dim oFolders As Scripting.Folders
Dim oDrives As Scripting.Drives
Dim oDrive As Scripting.Drive
Dim iCount As Short
Dim iFolder As Short
Dim oKey As IEnumerator
Dim FolderKey As IEnumerator
Dim CurrentFolder As Scripting.Folder
oDrives = oFS.Drives
oKey = oDrives.GetEnumerator
Do Until oKey.MoveNext = False
If oDrives(oKey.Current).DriveType.ToString = "Fixed" Then
oFolders = oDrives(oKey.Current).RootFolder.SubFolders
FolderKey = oFolders.GetEnumerator
FolderKey.MoveNext()
''''''''''''''''''''''''''''''''''''''''''''''''
CurrentFolder = CType(FolderKey.Current, Scripting.Folder)
MsgBox(CurrentFolder.Name)
'''''''''''''''''''''''''''''''''''''''''''''''''
End If
Loop
End Function
That which does not kill us, only makes us stronger. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|