Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to copy a file on a share located on the Server 2012, but it keep trowing me an error - the file name is too long. It is true that the path exceeds 255 characters, but I tough that this issue is long lost with the previous versions of Windows Server.

  • Is there some solution on the problem without shortening the file name path ?
share|improve this question
Easiest way is to create a share half way through the directory tree and connect to that instead. –  Dan May 13 '13 at 14:47
the issue is that i need to move the files from the client computer to the server, but there is a few thousands of folders, and hundreds of subfolders, and the directory tree shall be preserved. –  Yordan Yanakiev May 13 '13 at 14:50
Use a tool that supports the unicode paths `\\?\`. Paths are permitted to be up to 32,767 characters. Robocopy is one such tool that supports really long paths. msdn.microsoft.com/en-us/library/… –  Zoredache May 13 '13 at 19:38
@Zoredache, good tip, but he just needs to remember, that if just any of the clients that need to access the file (e.g. users, backup software), doesn't support long paths, it won't work. Somestimes it's best to adhere to legacy limitations, to make life easier :-) –  abstrask Jan 19 at 16:53
I've often used the subst command, to access long paths, in order to shorten names (or delete files). Just subst a good chunk of the path (I seem to recall the limit is actually 220-odd characters) to an available drive letter, and work from there. For really long paths, repeat the subst on the first subst drive. When done, remove the subst's in reverse order. A pain, but it gets the job done. –  abstrask Jan 19 at 16:57

1 Answer 1

The network share length issue still exists. You'll need to shorten the network share name, the server name and/or change the folder structure.

share|improve this answer
That's awful. After so many years Windows Server still having DOS inheritance issues. :| –  Yordan Yanakiev May 14 '13 at 8:18
Backwards compatibility is a pain. If Server 2012 allowed it and a Windows XP machine connected to it the client wouldn't be able to use the folder name. And given that most Fortune 500 companies are still using Windows XP that sort of thing has to be taken into account. –  mrdenny May 14 '13 at 15:40

protected by Sven Dec 26 at 12:27

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.