Quantcast
Channel: CSharp Forum Latest Questions
Viewing all articles
Browse latest Browse all 32056

Scanning System

$
0
0
Hi,

I want to create an exe in windows application which takes the count of tmp files in all drives on my system. And it excludes the system information folder because it is not accessible for domain users when it searches the files.

Below mentioned is the code which I have used.

 fileCount = Directory.GetFiles(@"C:\\", "*.tmp", SearchOption.AllDirectories).Length; 

This code gives error c:\system volume information access denied. 

I want to skip this folder.



Rgds
Deepak Sindhwani

Viewing all articles
Browse latest Browse all 32056

Trending Articles