Search Drive
Search Drive for files with a few lines o'code, Recursivly- Please VOTE!!!!
Assumes
Add: Commandbutton, dir list box, file list box, text1.text, label1, label3, listbox
Rate Search Drive
(3(3 Vote))
Private Sub Command1_Click()
File1.Pattern = "*.exe"
Label3.Caption = "Searching " & File1.Pattern
Call search("C:\")
End Sub
Public Sub search(dr As String)
Dim lst(5000) As String
Dim lstcnt As Integer
Dir1.Path = dr
listcnt = 0
Do While (Dir1.ListIndex < Dir1.ListCount - 1)
Dir1.ListIndex = Dir1.ListIndex + 1
listcnt = listcnt + 1
lst(listcnt) = Dir1.List(Dir1.ListIndex)
Loop
For i = 1 To listcnt
search (lst(i))
Next i
File1.Path = Dir1.List(Dir1.ListIndex)
DoEvents
Do While (File1.ListIndex < _ File1.ListCount - 1)
File1.ListIndex = File1.ListIndex + 1
List1.AddItem (Dir1.List _(Dir1.ListIndex) & "\" & File1.FileName)
DoEvents
Loop
End Sub
Search Drive Comments
No comments yet — be the first to post one!
Post a Comment