FAQ Database Discussion Community


Missing directory and file info

c#,ienumerable,enumerate,directoryinfo,filesysteminfo
The following is not returning a full list of files and directories: IEnumerable<FileSystemInfo> files = new DirectoryInfo("C:\\Windows\\System32\\drivers").EnumerateFileSystemInfos("*", SearchOption.AllDirectories); The application is run as a administrator. There are no additional file filter drivers in place. For example if I run: foreach (FileSystemInfo file in files) { Console.WriteLine(file.Name); } I get: en-US...

Program not gathering directory information

c#,service,system,directoryinfo
I am working on a program that gathers information about the machine for troubleshooting purposes. After some work on the program running as admin, I couldn't get it to output all the files in the %windir%\drivers properly. I also ran into issues with the current users appdata where it throws...