I am trying to get a list of files using this line of code:
But it errors out on folders that are inaccessible, like the RecycleBin folder & the program stops. So how do I get a list of files in all folders, while skipping the inaccessible ones?Code:Dim files() As String = IO.Directory.GetFiles("D:\", "*.*", SearchOption.AllDirectories)




Reply With Quote