Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private _TextFound As Boolean = False
- Private Sub Button10_Click(sender As System.Object, e As System.EventArgs) Handles Button10.Click
- FindTheText("C:tempInHere", "cheese")
- MessageBox.Show(_TextFound)
- End Sub
- Private Sub FindTheText(sDirToLookIn As String, sTextToFind As String)
- If IO.Directory.Exists(sDirToLookIn) Then
- Dim di As New IO.DirectoryInfo(sDirToLookIn)
- For Each dii As IO.DirectoryInfo In di.GetDirectories
- FindTheText(dii.FullName, sTextToFind)
- Next
- If IO.File.Exists(sDirToLookIn & "SomeFile.html") Then
- If IO.File.OpenText(sDirToLookIn & "SomeFile.html").ReadToEnd.Contains(sTextToFind) Then
- _TextFound = True
- End If
- End If
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement