1
Answer

Path longer than 248 char is throwing exception with GetFile() method of System.IO

Amit Choudhary

Amit Choudhary

14y
2.5k
1
Hi guys,

 Got a good question for you.
 I'm trying to search a directory that have nested directories and target is to find some files.
 and what is happening is Path longer than 248 char is throwing exception with GetFile() method of System.IO

 I hope somebody have faced this problem. Any ideas how to search the files with path longer than 248 char.


 Thanks.
 
Answers (1)
0
Amit Choudhary
NA 27.7k 3m 14y

 Well after digging a lot of sites found the solution but it seems to that it only supported in 4.0 and i need this in 3.5.
 
 http://blogs.msdn.com/b/bclteam/archive/2007/02/13/long-paths-in-net-part-1-of-3-kim-hamilton.aspx

 http://bcl.codeplex.com/wikipage?title=Long%20Path&referringTitle=Documentation

 if you have better than this then please share.. i'll appreciate that.

 Thanks