Can Robocopy still work for long path name?

Marcus Wong Theen Nam 1,111 Reputation points
2021-07-27T04:02:31.353+00:00

I'm about to migrate file server from Windows Server 2008 SP2 to Windows Server 2019 by using Robocopy. Before I do robocopy I'm trying to export out the permission using Get-ChildItem and script from https://social.technet.microsoft.com/wiki/contents/articles/51422.how-to-export-folder-permissions-to-excel-or-csv-file.aspx

However, during the export process I received error saying that the path are too long and it couldn't export out the permission. This issue I've created another question in Microsoft Q&A forum.

So for this one, can anyone kindly advise if I can still do the robocopy if the folder path names are too long? Because I'm going to ignore this and proceed with the Robocopy, just to avoid any issue came out during the copy process.

Windows Server Infrastructure
Windows Server Infrastructure
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Infrastructure: A Microsoft solution area focused on providing organizations with a cloud solution that supports their real-world needs and meets evolving regulatory requirements.
544 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jenny Yan-MSFT 9,336 Reputation points
    2021-07-27T05:39:47.543+00:00

    Hi,

    By default, ROBOCOPY will accept UNC pathnames including UNC pathnames over 256 characters long and it also provides a flag that lets you turn OFF support for long path names (flag: /256)

    "/256 Turns off support for paths longer than 256 characters."
    https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy

    ----------

    If the Answer is helpful, please click Accept Answer and upvote it.

    Thanks,
    Jenny


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.