destination filename is too long

devnullius

Patron
Joined
Dec 9, 2015
Messages
289
A BIG nuisance of NTFS is the max limit for the path length of a folder and the files within.

I was hoping that with ZFS I would not have such ridicule limitation.

Copying an NTFS disk to share "R" proved me wrong just now :(

Something I can do so I never ever get 'file name too long' errors? This makes making a backup copy a pain :(

Devnullius
 

devnullius

Patron
Joined
Dec 9, 2015
Messages
289

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
ZFS share
Is the error coming from a CLI move command, or are you using windows remotely mounted CIFS file share?

What do you mean by ZFS share?
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
IOW - ZFS can handle the longer filename and paths. But Windows through CIFS still has issues.
 

devnullius

Patron
Joined
Dec 9, 2015
Messages
289
IOW - ZFS can handle the longer filename and paths. But Windows through CIFS still has issues.
Win 10 client with data disc: ctrl-a the NTFS disc, copy it to a CIFS (made on a ZFS volume, which will hold the data). It's the Win 10 client that gives the error that it needs to skip all files that are too long 'for the destination'...
 

devnullius

Patron
Joined
Dec 9, 2015
Messages
289
It's the Win 10 client that gives the error that it needs to skip all files that are too long 'for the destination'...
So my only solution will be creating a gigantic zip archive to make a backup of the whole disc?

...
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
I had a similar issue when I migrated my data. I changed some folder names (to shorter names) and I moved some folders with long filenames to a higher level sub-folder to get under the 255 windows character limit.

Good luck.
 

Rand

Guru
Joined
Dec 30, 2013
Messages
906
Been in the same boat :/ Shortened my folder names.

If you really really dont want to do that and have some spare time you o/c can write a script to replace/rename the long folders with something shorter and re-rename after moving - or at least identify the culprits and then decide what to do
 

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215
Some options to try and get around this are:
  • Map a drive letter to a folder that is deeper into the structure and then use that instead of the full path
  • Use the truncated/short naming conventions when specifying the source (example: "C:\Program Files\" = "C:\Progra~1\")
    • Simply "DIR" command with the "/X" Switch will provide the short names
 

Mlovelace

Guru
Joined
Aug 19, 2014
Messages
1,111
Robocopy the data to the freeNAS share, it won't care about the filename length. Robocopy is your best friend in a Windows environment and it's multi-threaded.
 

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215
Robocopy the data to the freeNAS share, it won't care about the filename length. Robocopy is your best friend in a Windows environment and it's multi-threaded.
While I love RoboCopy, I do think that it has limitations as well. Vaguely recall from the past, but meh; it is definitely worth a shot. Just make sure to specify the Retry and Wait settings. ;)
 

Mlovelace

Guru
Joined
Aug 19, 2014
Messages
1,111
While I love RoboCopy, I do think that it has limitations as well. Vaguely recall from the past, but meh; it is definitely worth a shot. Just make sure to specify the Retry and Wait settings. ;)
Robocopy.exe Robust File Copy Utility Version XP010: Previous versions of Robocopy would fail to copy any pathname longer than 256 characters. The program has now been enhanced to handle pathnames of any length, up to the internal Windows limit of nearlt 32,000 characters.
 

Attachments

  • robocopy.pdf
    98.5 KB · Views: 496

devnullius

Patron
Joined
Dec 9, 2015
Messages
289
:) great tips - I feel dumb not going 1 folder deeper; I could have done that too. Renaming folders isn't an option, this time. I need exact folder structure (they are data disks from Windows Home Server Extended Drive set). So I started zipping them all (no compression); 1 advantage is that there's no small files bottleneck. Disadvantage is that I never get faster than about 17 to 19MB/s with 7zip. On average this might be faster than watching max 1 file/sec transfers I had before...

Next time I'll take another look at Robocopy and I'm surprised there's an internal windows limit of 32k - though it would explain why I often find myself creating files and folders that are too long but as soon as I want to copy the data to a shorter path, it fails with "too long".

I'm also curious what linux will do when I start copying the 2nd disc. CIFS just sucks big balls :(

Devvie

Post-edit: I'll give this a shot https://technet.microsoft.com/en-us/magazine/2009.04.utilityspotlight.aspx
 
Last edited:

devnullius

Patron
Joined
Dec 9, 2015
Messages
289
Linux was a bit better, but not that great either.

So looking at robocopy, I first tried 2009-Spotlight (improved version of 2006-Spotlight - both follow ups for robocopy, with GUI).

2009 version cannot do network (sigh).
2006 version looks fine but does nothing, not even creating a log file (even as Administrator).
Sigh.
Do I really have to go command prompt now?

Devvie

Post-edit: found a new candidate, frequently updated: http://www.upway2late.com/projects/winrobocopy
 
Last edited:

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215
RoboCopy is built into Windows 7 and above and has logging capabilities. Type: RoboCopy /? to get the help info.

Command line is not that bad... :)

Edit: Misread your response, was assuming you were unaware of RoboCopy being built into Win 7 and up..
 

devnullius

Patron
Joined
Dec 9, 2015
Messages
289
Code:
Started : donderdag 3 maart 2016 23:36:35
Source : H:\ (local SATA)
Dest : R:\ (mapped CIFS)
Files : *.*
Options : *.* /V /X /S /E /DCOPY:DA /COPY:DAT /IT /MT:12 /R:1 /W:5
------------------------------------------------------------------------------
2016/03/03 23:36:35 ERROR 5 (0x00000005) Accessing Destination Directory R:\
Access is denied.
Waiting 5 seconds... Retrying...
2016/03/03 23:36:40 ERROR 5 (0x00000005) Accessing Destination Directory R:\
Access is denied.
ERROR: RETRY LIMIT EXCEEDED.
------------------------------------------------------------------------------
Total    Copied   Skipped  Mismatch    FAILED    Extras
Dirs :         1         1         1         0         0         0
Files :         0         0         0         0         0         0
Bytes :         0         0         0         0         0         0
Times :   0:00:05   0:00:00                       0:00:05   0:00:05


I'll try to figure out what's going wrong here :/

Post-edit: I think I found my winner: http://tribblesoft.com/EasyRoboCopy.php - will be testing next, but looks insanely complete XD
 
Last edited:

Mlovelace

Guru
Joined
Aug 19, 2014
Messages
1,111
Command prompt is better.
Code:
Robocopy "<source-path>" "<dest-path>"/copy:DAT /e /zb /xo /fft /r:1 /w:0 /MT:10 /log+:<filename>.txt /tee


Edit: looks like it doesn't have write permissions to the directory in the post above.
 
Top