Can't copy files, filename/path too long

AMD T-type

Supreme [H]ardness
Joined
Aug 26, 2002
Messages
4,590
So I understand the file name restrictions on length and path but here is what I do not understand.

I'm on a clients server migrating data to a new RAID array. The main folder that I am moving is D:\Shared and I'm moving it to F:\Shared.
There are a few hundred files that synctoy is failing to copy stating that the file name/path is too long.

My question is, how can it exist in the first place if it is too long to copy?
 
Is it renaming anything during the copy phase? My only guess would be that somehow during the transfer it has to rename the folder/files and that temp name appended to the existing length of the files is causing some kind of issue.

A file can be set to the max in its original directory just fine. The problem usually comes when organizing files people like to keep fine tuning files by adding more sub-directories within sub-directories. Usually you don't run into a problem unless you have a very solid way of organizing files and keep the naming conventions specific. Once you hit the limit it can be a real PITA to work with the file outside of just opening it. I still do not get the 255 character limit myself It makes sense to have some kind of limit to prevent malicious abuse, but that limit seems too low in this day and age with massive hard drives and all the tools we have now.

Looking into this problem years ago because it still raises my curiosity, there is a extended path link Windows supports past 255 but it's extremely complicated (never got it working) and just isn't naturally supported by the OS.
 
Synctoy and other programs I have tried just flat out fail to copy the files.
If I try to drag and drop the shared directory (since the files are all over the place in the shared folder) when it gets to said files it only gives me an option to skip or cancel.
 
Stop using SyncToy, start using RichCopy if you want a GUI or learn to use Robocopy (more reliable than RichCopy but it's CLI).

RichCopy and RoboCopy handle long path names. Windows handles long path names just fine; it's actually just Windows Explorer that can't handle file paths longer than 260 characters. Even in Windows 8.1. (Really, Microsoft? Really? /slow golf clap)
 
Been trying with RichCopy for the last 45 minutes, its still erroring out (system cannot find the file specified) on files with too long of a path, not sure if I'm just not using the correct settings or what.

In any case, thanks for the suggestion about RichCopy. I need to look into it some more.
 
Robocopy itself seems to be doing the job, its just the fucktard end users who are screwing me over at this point as I've been finding a lot of discrepancies such as folders leading with a space and whatnot.
God I hate incompetent end users with a passion.
 
I would suggest that you try out the Long Path Tool. Its sure to sort out your problem.
 
how are the users accessing the shared folders?
That could happen in this example:
D:\Shared is a share called Shared.

User has an M: drive mapped to \\server\Shared\folder1\folder2\folder3\
User has file in:
M:\myfolder1\myfolder2\myfolder3\myfolder4\supercalafragalisticexpealidocious.doc

That would be fine for the user, since the M: drive is mapped a few folders in.
But from the server, the path would be:

D:\folder1\folder2\folder3\myfolder1\myfolder2\myfolder3\myfolder4\supercalafragalisticexpealidocious.doc

So.... yeah. That's how it happens.
 
Robocopy is worth learning if you intend to be working in a lot of Windows environments.
 
Is the new array on an actual san or direct attached/ local storage to a host? Sometimes vendors specific tools may need to be used to mitigate the long name issue too. EMC you gotta use their tools migrating cifs servers around
 
how are the users accessing the shared folders?
That could happen in this example:
D:\Shared is a share called Shared.

User has an M: drive mapped to \\server\Shared\folder1\folder2\folder3\
User has file in:
M:\myfolder1\myfolder2\myfolder3\myfolder4\supercalafragalisticexpealidocious.doc

That would be fine for the user, since the M: drive is mapped a few folders in.
But from the server, the path would be:

D:\folder1\folder2\folder3\myfolder1\myfolder2\myfolder3\myfolder4\supercalafragalisticexpealidocious.doc

So.... yeah. That's how it happens.

We've run into this several times with network shares at work.
 
Back
Top