How to Fix SharePoint Folder Sync Error: Path Is Too Long
Question details
The user is unable to synchronize a SharePoint folder using OneDrive because the file path exceeds the supported length limits.

- Product
- SharePoint / OneDrive
- Device & OS
- not provided
- Scenario
- Attempting to sync a SharePoint document library or deeply nested folder to a local PC using the OneDrive sync client.
- Observed behavior
- OneDrive refuses to synchronize the affected folder and displays an error indicating that the file path is too long.
Verify the current folder structure in your SharePoint library online. Windows and OneDrive typically enforce a 260-character limit for file paths, so deeply nested folders or extremely long file names must be reorganized.
Stop Syncing and Shorten the File Path
Because OneDrive does not allow you to exclude specific subfolders from a synced SharePoint library, you must stop syncing the entire library, shorten the paths, and then sync again.
To resolve the path limit issue, you need to work with the library owner to move the problematic files to a higher-level folder. Selective synchronization of subfolders is not supported, meaning the entire directory structure must comply with the path length limits.
Click the OneDrive cloud icon in your system tray, select the gear icon to open 'Settings', navigate to the 'Account' tab, and click 'Stop sync' next to the affected SharePoint library.
Open File Explorer, locate the previously synced SharePoint folder (which will now have a regular folder icon instead of a building icon), and delete it to remove the localized path issue.
Ask the SharePoint library owner to move the deeply nested folders and files to a higher-level directory, or shorten the names of the folders to reduce the overall character count.
Once the file paths have been shortened, go back to the SharePoint online library in your web browser and click the 'Sync' button to start syncing the optimized folder structure to your PC.

Try WPS Office for Seamless Document Management
If you are frustrated by SharePoint and OneDrive sync limitations, consider switching to WPS Office. It provides a lightweight, fast, and free alternative to Microsoft Office, complete with its own robust cloud storage solutions and seamless format compatibility.
- 1. Download the installer: Visit the official WPS Office website and click the 'Free Download' button to get the latest version.
- 2. Install WPS Office: Run the downloaded installation file and follow the on-screen prompts to set up the software on your computer.
- 3. Open and edit files: Launch WPS Office and open your existing Microsoft Office documents to start editing immediately.

Frequently Asked Questions
Can I choose to sync only specific subfolders in a SharePoint library?
No, OneDrive does not support selective synchronization of subfolders within a synced SharePoint library. Once you click sync on a folder, all its contents and subfolders will be synchronized. To avoid syncing certain files, they must be moved to a different library or higher-level folder.
What is the maximum file path length for OneDrive and SharePoint?
Historically, Windows systems and the OneDrive sync app enforce a 260-character limit for the entire file path, which includes the drive letter, folder names, file name, and extension. Exceeding this limit prevents synchronization.
Is there a way to bypass the sync limitation without moving files?
If you cannot shorten the file paths, you can access the files directly through the SharePoint web interface. Alternatively, you can use the 'Add shortcut to OneDrive' feature instead of 'Sync', though this still relies on Windows Explorer path limits when opening files locally.




