I'm creating a method to handle file exceptions.
I have listed all files in a directory and search for subdirectories and list all files in those subdirectories too on the C:\Users\ folder
listBox1.Items.AddRange(Directory.GetFiles("C:\\Users\\", "*", SearchOption.AllDirectories));
Some files are protected by windows, and when you run a command for those files it gives me an exception.
If there is any possible, How can I save the files that returned the exception to another listbox when the exception happens and continue listing the files to first listbox?