Hello all.

I used

Directory::GetDirectories()

and

Directory::GetFiles();

to search the file system.

Normally, I got an Unauthorized Access Exception which I caught using a try\catch block

This didn't ignore the exception and kept failing when facing a System directory, but only without throwing the exception.

I used this (If) to ignore System directories but it didn't work giving me the error:
(operator '&': all operands must have the same enumeration type)

if ((File::GetAttributes & FileAttributes::System) != FileAttributes::System)

Finally, I decided to ask about a way to(access) all directories (System or hidden) and search within them.

I'm using VC++ 2010 and .Net Framework 4

Sorry for any inconvenience as I am still a beginner.;)

thanks in advance.

Well I don't think my question is that difficult and I can't believe no one has an answer!!

27 views and nothing appears! May be I'm asking for the impossible!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.