Ingo Karstein's Blog

SharePoint & PowerShell

“LongPathSupport”: Operate with files and directories with “long paths” in .NET (CodePlex Project)

Posted by Ingo Karstein on 2011/08/22

In my project RoboPowerCopy ( I’ve implemented a basic set of classes and methods for use with files and directories with long paths. NTFS supports paths with up to 32000 characters. But .NET only supports 256 characters. So System.IO.FileInfo and System.IO.DirectoryInfo will not work with such a file:


This path has 655 characters. No way in .NET without using the Win32 API.

I’ve wrapped the API calls into a set of basic .NET classes to provide a basic support for files and directors with long paths…

Here it is:

Please feel free to contribute the project or post you experiences on my blog or on Codeplex!

For the project I’ve read/used some other source in the Internet. Especially this three I’d like to refer to:

One Response to ““LongPathSupport”: Operate with files and directories with “long paths” in .NET (CodePlex Project)”

  1. GabrielNar said

    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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s


Get every new post delivered to your Inbox.

Join 58 other followers

%d bloggers like this: