1

I'm looping through directories on a network drive, but some directories are bad ReparsePoints and don't actually exist.

Using Directory.Exists returns true after about 30 seconds, and so does new DirectoryInfo(dir).Exists, however trying to open the folder in windows explorer returns the following error message:

I:\MyFolder is not accessible.

The network path was not found.

Trying to access the directory contents using dir.GetDirectories() throws an exception because the path doesn't exist, and so does other methods such as dir.GetAccessControl().

Is there a way to determine if a network path exists or not when there is a valid ReparsePoint for the folder?

The only folder attributes are Directory, ReparsePoint

Charles
  • 50,943
  • 13
  • 104
  • 142
Rachel
  • 130,264
  • 66
  • 304
  • 490
  • Doesn't your recent question ask about this? http://stackoverflow.com/questions/18750974/identifying-bad-reparsepoints-with-getdirectories-in-net-3-5 – jamesSampica Sep 27 '13 at 21:20
  • @Shoe It's definitely related, but I wasn't sure if I should edit that one or not since the question in slightly different and an answer was already posted. The goal of the 1st question was to find a different way to determine directory attributes that doesn't encounter the performance hit on bad reparse directories, while this one is to determine if the directory actually exists or not. Currently I am checking attributes on another thread, and assuming its bad if it doesn't return a result within 3 seconds, but assuming its bad isn't working for my current logic – Rachel Sep 27 '13 at 21:31

0 Answers0