Directory Path Limit

I am aware that the directory path limit is 255 characters.  

First, why does Windows allow folders/files to be created which exceed the limit and then error out on attempts to copy or delete these?

Is there software or some method that supports copying / backing up thse files?

Is there a way to prevent users from creating folders/files that exceed the limit?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Here is a little program to find long file/folder names and will allow you to rename them:

btreeAuthor Commented:
Thanks.  I am aware of the program.  However, I want to be able to preserve the file and directory names if at all possible.
Can you copy them from the cmd shell using something like copy c:\longfil~.doc to e:\longfil~.doc ?
btreeAuthor Commented:
I can give that a try for testing purposes (I am not sure if you are wondering if that is technically possible and if it were then that would be the solution).  However, it is likely that I will need to re-copy the files periodically and there are a very large number of folder and files so the process has to be as automated as possible.  
I was thinking about your delimma and think I came up with a plausible work around for you.  Why not create shares furhter down in your directories?  Yes you will have more shares, but it would save you from the long directory path.


instead of using f:\...\..\.\\.\.\(255)filename.doc  create a shared down the chain where it makes sense and you can get away with creating as few extra shares as possible.

Or you can move your folders closer to the top by re-organizing them.

I had a similar problem with our document management server.  The quality management people created several thousand directories some of them exceeding the limit.  I had to go re organize them and flatten their directory structure out to correct the problem as a long term solution.

as to copying the folders and files I would recommend using robocopy from the resource kit:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.