Find File In System [solved]

Posts 1–4 of 4 · Page 1 of 1
Find File In System [solved]
Hello, Im making a File Finder but I have some problems
Code:
  ListBox1.Items.Clear()
        FolderBrowserDialog1.ShowDialog()
        For Each filer In My.Computer.FileSystem.GetFiles(FolderBrowserDialog1.SelectedPath)
            ListBox1.Items.Add(filer)

        Next
This just add the files of the selected path, how I make It to FIND a word I put on a TextBox?

----
Code:
If TextBox1.Text.Contains(" HERE TEXT") Then
            
'here what you want to do after it finds a word
        End If
Well I think I explained bad . . . but Well I solved it

Code:
  Dim valor As String
        valor = TextBox1.Text
        ListBox1.Items.Clear()
        FolderBrowserDialog1.ShowDialog()
        For Each filer In My.Computer.FileSystem.GetFiles(FolderBrowserDialog1.SelectedPath, FileIO.SearchOption.SearchAllSubDirectories)
            If filer.Contains(valor) Then
                MsgBox(filer)
                ListBox1.Items.Add(filer)
            End If
        Next
Markes solved then :3
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Need help?