Forum Discussion
Sharepoint Sync Onedrive - Long File Name issues
I need move some file from sharepoint to onedrive . i have add sharepoint folder to shortcut one drive . but when update on this device. , prompt up file long file name , need rename shorted after can sync . a lot of files. I tried using PnPShell to try search long file name files . but the scripts does not work .Pls share other solution to solve out the isseus.
1 Reply
- virendrakIron Contributor
SharePoint Online allows very long paths (400 chars), OneDrive sync does not, it supports only 260 chars.
1. Use SharePoint’s built‑in “Export to Excel”
This avoids PowerShell entirely.
- Go to the SharePoint library.
- Switch to List view (not Tiles).
- Click Export > Export to Excel.
- Open the file in Excel.
- Insert a new column and use Code:
=LEN([@[Path]] & "/" & [@[Name]]), This shows the full path length, which is what OneDrive checks.
- Sort by length.
Anything over 200 characters is a risk. Anything over 260 will break OneDrive.
2. You may use PowerShell with Graph. PnP sometimes fails because it does not return full paths for deeply nested items.