Advertisement
3_2004-2005 Files/ File Controls/ Input/ Output #143154

Search Drive

Search Drive for files with a few lines o'code, Recursivly- Please VOTE!!!!

AI

Shrnutí AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Zdrojový kód
original-source
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
Původní komentáře (3)
Obnoveno z Wayback Machine