I am writing a program to find all the files with the specified filter. The program works fine if i give path to some folder, but throws an exception if i pass the drive letter as parameter. Can you please help me resolve this problem?
I am getting error UnauthorizedAccessExceptio
n: Access to the path 'E:\System Volume Information' is denied.
string FileNames = Directory.GetFiles("E:\\","*.chm", SearchOption.AllDirectories);
foreach (string FullPath in FileNames)
FileInfo file = new FileInfo(FullPath);
string Path = file.DirectoryName;
string FileName = file.Name;