Results 1 to 4 of 4
  1. #1
    alvaritos's Avatar
    Join Date
    May 2008
    Gender
    male
    Posts
    234
    Reputation
    9
    Thanks
    73
    My Mood
    Amazed

    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?

    ----
    Last edited by alvaritos; 06-24-2011 at 08:07 AM. Reason: DC

  2. #2
    hustelboy's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Underground Cave System Posts: 4,435,765
    Posts
    312
    Reputation
    28
    Thanks
    39
    Code:
    If TextBox1.Tex*****ntains(" HERE TEXT") Then
                
    'here what you want to do after it finds a word
            End If

  3. #3
    alvaritos's Avatar
    Join Date
    May 2008
    Gender
    male
    Posts
    234
    Reputation
    9
    Thanks
    73
    My Mood
    Amazed
    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

  4. #4
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Markes solved then :3

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)