Manthou
Manthou

Reputation: 9

Recursively get file and directory name without exception in VIsta and win7

I [have a program which] recursively searches my computer drives to list all the files available but when the program runs, it throws a runtime exception and stops. I am not a fan of nested directory search, you know. I have no clue what should I do to get all files and drives names printed in my ListView.

I run this program on Vista and Win7 and it fails on both.

Upvotes: 1

Views: 161

Answers (1)

CodeNaked
CodeNaked

Reputation: 41393

You don't show your code, but I suspect you are not handling any possible exceptions. There are folders/files in Windows that you cannot search due to permission issue (even if you are running as an admin). In those cases, there would be an exception raised which would need to be handled gracefully.

Upvotes: 2

Related Questions