Need way around MAX_PATH in Windows XP / Server 2003 R2

Penncomp used Ask the Experts™
We have a client that is having excessive problems with saving/renaming/moving files on a share located on a windows 2003 R2 server.  I've already worked with her to shorten the file/folder names and the current particular folder is mapped up as far up as possible with its own drive letter.  This is becomming a bigger and bigger problem every time she brings it up.  The last time I was about to resort to making her login to the server where the NTFS limit of 32768 wouldn't pose a problem.  We need a solution even if its a third party application that has to be installed at each machine.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

This is an issue with Windows OS.  The best advice is to make sure that folder names and file names are short.  There is a 255 character limit for the path.

The limit on a filename is 255 and the limit of path+filename is 260.  If you are seeing 280 in length this means your share path name (\\Server01\Username) is smaller than the path where the files are actually store on the server (D:\Data\Users\Username\).  This problem should also make it so you couldn't open up the long length directly from the server and you would have to open it from a share.  You can increase the share length which would force them to choose shorter filenames, though if you did that without prior notification they may not be able to open files that are too long.

Another problem would come where you can increase the length of folder name containing the long filename and then you would not be able to open that file.

I am pretty sure that you cannot limit this so I would just suggest that you increase the share length in case your files can not be backed up since they went of the 260 character limit because of a possibly short share path.

As for a 3rd party utility the only thing I can think of would be something to scan your data every night and report on long file names but I don't think that is what you really want.


I know its a limit of the OS.  The client is getting irritated with me constantly telling her to shorten the names of everything.  Its not possible to reduce any more without confusing them to the point of not being able to find what they are looking for.

I had issues with this same thing, but they have to change their naming scheme or you will not be able to backup the files or they will not be able to access them.  Stress that it is a limitation of the OS and there is not anything that can be done to fix this.
We actually lost data due to the naming scheme becuase the server could not back up the files.  255 characters is a long name to name things.
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

I've done a lot of research on this topic... and have even created a set of replacement .Net classes that overcome this limitation.   So, I can say with some degree of certainty that there is no good solution.  I'm told that TotalCommander can be used as a subsititute for the Windows Explorer to overcome this, but I've never tried it myself 
I have a written a tool called PathTooDeep that I periodically run on our servers to detect where these long file names are.  You're welcome to take a look at the VB.Net source code if you're interested in compiling the application for use.
If it were just the name it wouldn't be an issue.  Everything is categories into sub folders.  Even at 15 characters each thats less than 20 sub folders each.  With hundreds of thousands of files its really hard to be descriptive with that.  Its a windows explorer limit surely there is some other software out there especially since the NTFS limit is closer to 32000.
No, there is no "magic switch" that you can apply to the Windows Explorer that will solve this problem.  However, there are 3rd-party tools that you can use in place of Windows Explorer (like TotalCommander that I mentioned above).

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial