B
Blader
Guest
Hello.
I used the code below. If i it run "C:\Documents and Settings' is denied" appears. How can I skip denied folders?
Thank You.
string rootDirectory = System.IO.DriveInfo.GetDrives()[0].RootDirectory.FullName;
string[] files = System.IO.Directory.GetFiles(rootDirectory,
"file.exe", System.IO.SearchOption.AllDirectories);
foreach (var str in files)
{
Console.WriteLine(files);
}
Continue reading...
I used the code below. If i it run "C:\Documents and Settings' is denied" appears. How can I skip denied folders?
Thank You.
string rootDirectory = System.IO.DriveInfo.GetDrives()[0].RootDirectory.FullName;
string[] files = System.IO.Directory.GetFiles(rootDirectory,
"file.exe", System.IO.SearchOption.AllDirectories);
foreach (var str in files)
{
Console.WriteLine(files);
}
Continue reading...