Hey guys,
I have this small file search engine here made in VB.NET: ListBox1.Items.Clear() ListBox3.Items.Clear()
ChDir("C:\")
Try
For Each foundFile As String In My.Computer.FileSystem.GetFiles( _
My.Computer.FileSystem.CurrentDirectory, _
FileIO.SearchOption.SearchAllSubDirectories, TextBox4.Text & "*.*")
ListBox1.Items.Add(foundFile)
ListBox3.Items.Add(foundFile)
Next
Catch ex As UnauthorizedAccessException
MsgBox("Could not access file or not enough priveledges")
End Try
It searches through your whole C:\ for the file you entered. Although the problem I get is that some directories get access denied or not existing directories. How can I fix this problem?
Thanks