I whipped up a proof of concept .NET ASPX WebForm using DirectoryInfo - GetFileSystemInfos(). But alas, with this method it was generating the following exception: Exception Details: System.IO.PathTooLongException: The path is too long after being fully qualified. Make sure path is less than 260 characters. After further research, the only solution I discovered was to use the Windows API via PInvoke of CreatFileEx. This API utilizes unicode for the path and can handle up to 32,000 characters. Supposedly appending the string "\\\\?\\" in front of the path should force that path to be sent as unicode, but I was unable to get this to work successfully. Instead, this was causing an invalid character exception. I will continue looking at this alternative considering the preformance improvements that would come along with it. It's just a matter of getting the unicode part working, here's a resource I discovered that showed some VB.NET code - http://vbnet.mvps.org/index.html?code/fileapi/fsoapicompare.htm. After more trial and error on my own, I did finally discover the easiest work around and that is to simply use these two methods of the .NET framework instead: System.IO.Directory.GetFiles() System.IO.Directory.GetDirectories()
They both return back string arrays of the full path of the files and directories respectfully. As long as you don't need the additional properties, as in this case, this is the easiest solution to the problem.
