|
-
Nov 9th, 2006, 12:13 AM
#1
Thread Starter
Hyperactive Member
[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.
-
Nov 9th, 2006, 12:24 AM
#2
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.
-
Nov 9th, 2006, 03:29 AM
#3
Thread Starter
Hyperactive Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|