WindowServer2012- Destination Path took too long

seema kanwal 26 Reputation points
2020-08-10T18:16:40.63+00:00

Dear Support,

We have NAS in our Head Office. From my Windows Server2012 Machine, When I try to copy data from one folder to another in NAS it gives error "Destination Path too long".
I have to maunally rename and shorten files and folder and then copy to other folder.
Its large size data nd its taking forvere to copy.Is there a workaround?
Can anyone please help me out?

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,494 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Jon Alfred Smith 541 Reputation points
    2020-08-10T18:56:19.423+00:00

    You could use the subst command
    https://helpdeskgeek.com/how-to/assign-drive-letters-to-folders-in-windows/

    In newer builds of Windows 10 and Windows Server 2016 or higher you could enable long file path support.

    0 comments No comments

  2. Joy Qiao 4,886 Reputation points Microsoft Employee
    2020-08-11T07:30:12.2+00:00

    Hi,

    We could try to copy with command line below as administrator in CMD.

    xcopy path to source files path to destination /O /X /E /H /K

    Please note: Keep in mind that path to source files and path to destination are simply placeholders for the exact paths. Replace the placeholders with the real locations before hitting Enter.

    By the way, like smith said, if you are using Windows 10 1607 or Windows server 2016 or upper system version, we also could modify registry value LongPathsEnabled=1 through Computer > HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > FileSystem
    But as you are using Windows server 2012, so try xcopy at first.

    Bests,


  3. Alexey Klimenko 6 Reputation points
    2020-08-11T07:44:04.917+00:00

    Take a look of this branch - Computer >> HKEY_LOCAL_MACHINE >> SYSTEM >> CurrentControlSet >> Control >> FileSystem
    Parametr = LongPathsEnabled

    0 comments No comments