I'm trying to get all the subDirectories of a directory using the:
DirectoryInfo.GetDirectories("*",SearchOption.AllDirectories).
On all folders i have tested this is returns correct results
BUT
If u execute this on "C:\Windows\System32 you will find 2 problems:
1.(Solved) Is about a folder that u don't have permisions, don't remember the name but if you browse the path through the explorer, Windows asks to get permission and once got, It all works Fine.
2.Running it again you will see that it executes with no exceptions
BUT
Directories are missing !!!
No exception thrown..Nothing
After searching it for a while i found a directory that's missing.
"C:\Windows\System32\appmgmt" for example, I suppose it exists on all machines.
The strange thing is that if you execute the [DirectoryInfo.GetDirectories(..)] with the sourceDirectory = "C:\Windows\System32\appmgmt"
you will end up with a DirectoryNotFoundException and the elegant message:
"Could not find a part of the path 'C:\Windows\System32\appmgmt\'."
The directory is there...It just doesn't see it or like it or...:(
Quick Download Solution File to see for yourself :
http://www.filesonic.com/file/1034796551/DSS_-_Copy.rar[
^]