Hi,
I am trying to find an .exe file which is residing in my local system. I was looking for a LINQ which can do the thing for me and i found this piece of code. But the issue is that it will throw exception when going through "Access Denied" directories. So can anyone please help me.
var ext = new List<string> {".exe"}; var myFiles = Directory.GetFiles("C:\\", "*.*", SearchOption.AllDirectories).Where(s => ext.Any(file => s.EndsWith(file)));
Arjun Menon U.K