I am trying to get a list of all directories that i have in "My documents" folder (I am using vista btw..) and I use this simple code:
For Each str1 In My.Computer.FileSystem.GetDirectories("C:\Users\loxaXcracker\Documents", FileIO.SearchOption.SearchAllSubDirectories)
TextBox1.Text = TextBox1.Text + str1 & vbCrLf
NextThe problem is, that the "My music" foder access is denied (and i am the admin of the pc). I tried exception handling and it doesn't give the error that it used to but what I really want it to do, is to ignore the "Not accessible" error and just continue to the next file.Here's what i tried:
Try
For Each str1 In My.Computer.FileSystem.GetDirectories("C:\Users\loxaXcracker\Documents", FileIO.SearchOption.SearchAllSubDirectories)
TextBox1.Text = TextBox1.Text + str1 & vbCrLf
Next
Catch ex As UnauthorizedAccessException
End TryThanks in advance.












