I want to get all of the files in a directory in an array (including the files in subfolders)
string[] filePaths = Directory.GetFiles(@"c:\",SearchOption.AllDirectories);
The problem with this is: If an exception is thrown the entire command stops. Is there a better way to do this so that if a folder cannot be accessed it will just skip over it?