[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. :wave:
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.
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.