Solved

VB.Net   Directory.GetFiles stops on denied access

Posted on 2013-06-16
1
496 Views
Last Modified: 2013-06-17
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
0
Comment
Question by:PNRT
1 Comment
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 39251444
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Expando 4 46
VB.NET HttpWebRequest 12 56
Events in static methods 3 50
Get list of word ducuments in a folder 10 35
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now