Working around System.IO.PathTooLongException in .NET

I am working on a file-and-directory processing utility that iterates through very large filesystem structures and came across the dreaded System.IO.PathTooLongException when trying to create a DirectoryInfo object on a file path that was greater than 260 characters, the System.IO ANSI limit.

A quick search located the Delimon.Win32.IO library, built for the 4.0 framework. This library allows you to work with file paths up to 32K in length – hopefully way more than enough for any purpose!



One Response to “Working around System.IO.PathTooLongException in .NET”

  1. GabrielNar Says:

    I had the similar problem and tried Long Path Tool, available at It helped me to solve this problem easily. Try it, and you will definitely love this tool. Its free.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: