Share via

Invalid file names

Anonymous
2010-12-09T16:51:26+00:00

Hi

Is anyone able to explain just what goes on with file names?  I have a directory which has subfolders and files name in a way that is meaningful. However, various copying or other manipulative operations result in errors suggesting that the file names are too long.

If they're too long how come they are allowed to exist in the first place; and if they exist in one location why can't they exist in another?

Some of these error messages say that the file path can't be more than 260 characters, yet when I count up the characters of some files that have been successfully copied, the total far exceeds this figure.

There seems to be a large number of 3rd party applications which claim to overcome this, so I really wonder why Microsoft allowed it to remain an issue for so long?

Windows for home | Previous Windows versions | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2010-12-09T21:56:19+00:00

To answer your question, The MAX_PATH limitation of 256 characters could be _relative_ to the current directory so that if you change your working directory to a directory 10 levels deep, then you have another 256 characters to specify even deeper files...  but if you're at the top trying to copy the entire structure, you may run out of characters.

Apparently Microsoft has allowed for very long paths with the  "\?\C:\verylongpath"   construct although I've never tried using it.  Microsoft has their "Robocopy" application to copy files with deep pathnames. (Found in the Resource Kit )

Microsoft's explanation is in the following article:

"Naming Files, Paths, and Namespaces"

  < http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath >

I've given up second-guessing Microsoft.

HTH,

  JW

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful