The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

C#  var file = new FileStream(rootpath, System.IO.FileMode.Open)

Solution: Create a new network drive by clicking on Map network drive as shown below


Map the folder which has many nested folders and long file names


After mapping the drive you would be able to access the files by opening the network drive Y

Add Comment