Backing up files with filename\path length >256 characters in Windows 10 Home 64.

I have 400GB of files to back up for safety purposes onto an external USB HD.
I started using just the copy and paste for the whole thing and, it appears, this worked OK - probably better than one should expect.
However, there were many filename/path combinations that were too long.

The files aren't "mine" and I don't have any way to judge how to change the path length.
Yet, I'd like to get the backup job completed so I can move on to the next task.

I've tried running xcopy
C:\WINDOWS\system32>xcopy "C:\office" F:\office /c /d /e /h /i /k /q /r /s /x /y
but this results in
Unable to create directory - [name]
File creation error - The system cannot find the file specified.

This is on a Windows 10 Home 64-bit workstation.

Now, I've checked and the files appear to be there even if the filename/path length is greater than 256 characters.
There are too many to manually deal with this and I'd like to back up the remaining files that were initially missed.

Once the backup is done, perhaps we will be able to shorten the path lengths.  But the backup really needs to be done first if at all possible.

I'm doing this remotely so my ability to do things with the hardware or to boot from DVDs, etc. is accordingly limited.
What would you do?
LVL 27
Fred MarshallPrincipalAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

kenfcampCommented:
Have you tried Robocopy?
0
☠ MASQ ☠Commented:
What would you do?

I'd use Robocopy instead of Xcopy
0
JohnBusiness Consultant (Owner)Commented:
In addition to the above, try bulk renaming intermediate folders to a shorter length. At this point in time, there is not a Microsoft solution for long filenames so it is best to shorten them somehow.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Fred MarshallPrincipalAuthor Commented:
John:  
The files aren't "mine" and I don't have any way to judge how to change the path length.
We are working with the owners to suitably fix the length issue.

I would try Robocopy but had installed Beyond Compare to investigate the difference.  Not only did it find and display them nicely, it was able to copy them across at any level, file or directory.  But, in the future, I'll keep Robocopy in mind.  But nobody really said: "Robocopy will take care of this problem".  So, just to be sure: Will it?
0
JohnBusiness Consultant (Owner)Commented:
On a one time basis, Robocopy will get files from here to there as suggested above but the the problem persists. My suggestion above was for a longer term solution
0
kenfcampCommented:
Fred

If memory serves, Robocopy supports 256 characters by default
0

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
☠ MASQ ☠Commented:
"Robocopy will take care of this problem" :)
And included for free with Win 10 :)

" In the past the maximum supported file length was 260 characters (256 usable after the drive characters and termination character). In Windows 10 long file name support can be enabled which allows file names up to 32,767 characters (although you lose a few characters for mandatory characters that are part of the name). To enable this perform the following:

    Start the registry editor (regedit.exe)
    Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
    Double click LongPathsEnabled
    Set to 1 and click OK
    Reboot

This can also be enabled via Group Policy via Computer Configuration > Administrative Templates > System > Filesystem > Enable NTFS long paths."

https://www.itprotoday.com/windows-10/enable-long-file-name-support-windows-10
0
Fred MarshallPrincipalAuthor Commented:
Robocopy supports 256 characters by default
If so, why was it recommended?
But, nonetheless, I do appreciate the suggestions!

Now, I have seen the regedit for LongPathsEnabled;  however, it seems that not all things respond to this setting change.  So, I'm left with wondering and asking: "Will it help in this case / with this app?"
For example, I believe it will not work with Windows Explorer.  What else?  etc.
0
☠ MASQ ☠Commented:
Robocopy supports LongPaths by default - not the other way around - you can limit it to 256 characters in its settings configuration if you choose to but there's normally no need.

You're right that not all Windows software supports longpaths, however since the Win 10 Anniversary Edition 64bit Windows' Kernel does and by extension 64bit Windows File Explorer. Most newer 64bit Windows Apps are longpath aware but 32bit versions are much more hit & miss.

For your backup purposes though that shouldn't be an issue.
0
kenfcampCommented:
If so, why was it recommended?

Because that's file paths longer than 256 characters
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc733145%28v=ws.10%29
0
Fred MarshallPrincipalAuthor Commented:
Well, let's be clear:  I see from that link that Robocopy has an option:
/256  Turns off support for very long paths (longer than 256 characters).
Now, that does NOT say:
/nnn Turns off support for very long paths (longer than nnn characters).
No.  It's very specific.  
It clearly implies that longer than 256 characters support is the default.
And that's what everyone said....  
Thanks! Sorry it took me a bit to believe what I was reading.....
0
Fred MarshallPrincipalAuthor Commented:
Thanks again!!
0
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 10

From novice to tech pro — start learning today.