Path Length Problem

  • Thread starter Michael Jackson
  • Start date
M

Michael Jackson

A user of my app is reporting that he is getting a "path too long" error.
Thats all the info I have.

I'm testing, so I've created a folder structure on my machine up to the
point where XP tell me it cannot create the next folder, so I assume I've
reached the XP file path limit.

I then write a little code in a test app, paste the path from above into a
text box, and programitically change one of the folders name to a lengthy
name, then do a Path.Combine to append a file name to the end of the path. I
then invoke the Path.IsPathRooted just to see if the PATH class would
determine that the full path is too long (past 255 characters). It returns a
TRUE, and does not fail.

My basic question is how do I determine in .NET that a file path is too
long? Will .NET handle past 255, but Windows wont? I'm confused.

Michael
 
G

Guest

Michael Jackson said:
A user of my app is reporting that he is getting a "path too long" error.
Thats all the info I have.

I'm testing, so I've created a folder structure on my machine up to the
point where XP tell me it cannot create the next folder, so I assume I've
reached the XP file path limit.

I then write a little code in a test app, paste the path from above into a
text box, and programitically change one of the folders name to a lengthy
name, then do a Path.Combine to append a file name to the end of the path. I
then invoke the Path.IsPathRooted just to see if the PATH class would
determine that the full path is too long (past 255 characters). It returns a
TRUE, and does not fail.

My basic question is how do I determine in .NET that a file path is too
long? Will .NET handle past 255, but Windows wont? I'm confused.

Michael


I second the question/issue.

Is it possible to surpass (or get around) the 260 character full path
limitation? For corporate environments, particularly when working with file
servers where users store their files, it is not uncommon to run into
situations where users have been overly verbose in their naming of files and
directories. The "path too long" error that results when trying to work with
these files is a real show-stopper.

Any help on this issue? Suggested work-arounds (preferably not involving
p/invoke)? Please?

-Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top