Author: dcjohnston | Posted on: 8/20/2009 11:32:12 AM | Views : 1261

 I am using IO.DirectoryInfo to scan directories for specific file information. However, some directories are Read Only due to an ownership error attributes of the file. If the directory gets scanned and it finds a defective directory I trap the error which writes the path to a file.
The problem is that I want to scan the next folder in the path I am scanning. When it finds the error it cant scan that path any more.
Any Ideas?
 
Try Dim Directory As New IO.DirectoryInfo("" & dirPath & "") Dim allFiles As IO.FileInfo() = Directory.GetFiles("" & filetype & "", IO.SearchOption.AllDirectories) Dim singleFile As IO.FileInfo '---------------------------add files into list boxes For Each singleFile In allFiles ListBox3.Items.Add(singleFile. ...

Go to the complete details ...