'File name is too long' error when trying to restore file from "Previous versions"

Raúl Cuevas González 1 Reputation point
2022-05-19T08:37:40.977+00:00

I am attempting to restore a folder which was, by error, deleted in "Windows Server 2016". I can see several versions of that folder in "Previous versions" tab of its parent folder, and I can open any of those versions and browse it.

When I attempt to restore it, it begins to recover file after file, all working apparently fine until the end of the process. Then, it shows the error 'the file name is too long' for more or less 80 files, and those files are not restored. Using a third tool to compare the content of the "Previous versions" folder with the content of the restored folder, I can see clearly which are the files that could not be restored.

At this point, I have no way to restore those files. I can browse until them through the file explorer in the "Previous Version" folder, but I can not open, nor copy to other folder, none of those files, due to the length of theirs paths + names. And I have no option to shorten the name of the "Previous version" folder where they are currently! I cannot shorten the original fodler, because, in that case, when accessing to "Previous versions" tab, there is no previous versions. So, basically, heir path are totally static and just read only, and they are too much long, avoiding to open the files and save with other name, or copy them to other folder...

Also, I have activated the option to force Windows to work with long paths, and it didn't work, even after restarting the computer and confirm that, after the restarting, that option is still enabled.

Therefore, I don't know how to continue. I have some files saved in the "Previous versions" backups, but I cannot open, not recover them from there.

Does anyone know how could I solve this situation?

Thanks for your kindness and effort replying this question.
Best regards.

Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,395 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bastian R 0 Reputation points
    2024-03-01T14:36:55.04+00:00

    Hi Raul

    robocopy should be able to do the trick, because it supports long pathnames even if the registry key to allow long path names has not been set.

    Just had the same problem with snapshots on a NetApp filer and could resolve it using robocopy

    Best Regards,

    Bastian