Results 1 to 3 of 3

Thread: [RESOLVED] [2005] Search Computer For a File

  1. #1

    Thread Starter
    Hyperactive Member FireKnox101's Avatar
    Join Date
    Aug 2005
    Location
    Snohomish,Washington
    Posts
    301

    Resolved [RESOLVED] [2005] Search Computer For a File

    Ok, I dont know if there has been a post on this there probly has im just not typing in the right thing in the search bar. I was wondering how I could have my program search the users computer for a all .txt or "what ever name.txt". I just have 1 textbox called textbox1 and a button called btnEnter, and 1 listbox called lstItems. i just dont know how what code to use?

    Im using VB.net 2005 Express, Windows XP Pro SP2.

    Im currently using: VB.NET 2003, And VB 2005 Express
    My Projects
    Form Them Show Keypress In App
    Simple Ping Control

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] Search Computer For a File

    If you want to search the entire drive then you should conduct your own recursive search, code for which can be found in the VB.NET CodeBank. My.Computer.FileSystem.GetFiles and IO.Directory.GetFiles can theoretically do it for you but they will fail if they encounter a folder that you don't have permission to access, while you can handle that situation and continue when you do it yourself.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member FireKnox101's Avatar
    Join Date
    Aug 2005
    Location
    Snohomish,Washington
    Posts
    301

    Re: [2005] Search Computer For a File

    Thank you, I did a search here on IO.Directory.GetFiles and found a post were you had some sample code and i figured out what i needed to know, thanks again.

    Im currently using: VB.NET 2003, And VB 2005 Express
    My Projects
    Form Them Show Keypress In App
    Simple Ping Control

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width