Forum Discussion

Dinorah Flores's avatar
Dinorah Flores
Iron Contributor
Sep 21, 2022

How to resolve 'path is too long' error - endless abending loop!

I'm searching for the proper procedure to resolve a OneDrive for Business issue where a file path is too long. Still, when revised in SharePoint, the OneDrive account doesn't sync the changes and continues to alert the path being too long despite being renamed in SharePoint. :sad:

6 Replies

  • meshkiprono's avatar
    meshkiprono
    Copper Contributor

    Dinorah Flores 

    It is a very common in Windows for long path files being difficult to delete which is annoying. Usually I use a LongPathTool software you can try it too hopefully it helps.

  • pctfs's avatar
    pctfs
    Copper Contributor

    Hi Dinorah Flores,

     

    Enabling long paths in Windows worked for me. Windows is delivered with a file path limit of 260 characters, largely for historical reasons. 

     

    Microsoft has some information in an article https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later.

     

    From the article:

    Starting in Windows 10, version 1607, MAX_PATH limitations have been removed from common Win32 file and directory functions. However, you must opt-in to the new behavior.

     

    In order to used long paths in Windows 10 v1607, or later, the registry key

    Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled (Type: REG_DWORD) must exist and be set to 1.

     

    If you don't know about the Windows registry and how to make modifications, it would be best if you can find someone who is familiar with it to make this change for you. Please be aware that this modification could potentially break older software (possible but unlikely).

     

    Paul

    • PascalF1130's avatar
      PascalF1130
      Copper Contributor

      pctfs 

      I have similar issues. But the problem is not, that the file path is too long. It's that some how there is an endless file path loop. Any recommendations how to solve this case?

    • ZhengTzer's avatar
      ZhengTzer
      Copper Contributor
      Hihi,

      now 2024. i had set to value to 1, yet still having this error, any idea? Zzzz

      thanks
    • christianelias's avatar
      christianelias
      Copper Contributor

      Thanks for solution. it works on windows 10 v.2004!

      You can do it by powershell with admin rights: 

      New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
      -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force

       later reboot the machine

      cheers!

      • AdminIn440's avatar
        AdminIn440
        Copper Contributor

        Hello everyone,

         

        Spoiler
        I facing an issue with Microsoft OneDrive not be able to open or save file that has long path by it's showing an error as image below:



        please help check and feedback as soon as.

        Thank In advance.

         

        christianelias 

Resources