Link to home
Start Free TrialLog in
Avatar of PNRT
PNRT

asked on

VB.Net Directory.GetFiles stops on denied access

Hi Experts.  I am trying to get an array of all files in a directory with  Directory.GetFiles
When the code encounters denied access on a folder it cannot continue.

For Each currfile In Directory.GetFiles(CurrentPath, "*.*", SearchOption.AllDirectories)
Next

I know that there is no way for it to continue, but is there a way of adjusting the security requirements, or any way to continue?

Thanks for the help
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial