Made this little thing so that you can search for a word in any text file in a certain path, and it will tell you if it contains the word in text1.text...kind of like a extended text search thingy
VB Code:
Option Explicit Dim ff As Integer Dim mypath As String Dim p As String Dim strbuff As String Private Sub Command1_Click() mypath = "C:\" p = Dir(mypath, vbDirectory) Do Until p = "" If InStr(p, ".txt") Then ff = FreeFile Open mypath & p For Binary As #ff strbuff = Input(LOF(ff), ff) If InStr(strbuff, text1.Text) Then List1.AddItem p End If End If p = Dir Loop End Sub![]()





Reply With Quote