How to Fix OneDrive Installation Error for a File Path That Is Too Long
Question details
The user needs to resolve an installation or synchronization failure in OneDrive caused by a path-length limitation error.
- Product
- Microsoft OneDrive
- Device & OS
- not provided
- Scenario
- Installing the OneDrive application or attempting to sync files when deeply nested folders or previously deleted long-path folders are present.
- Observed behavior
- OneDrive installation or synchronization stops and displays an error stating that the file path is too long, sometimes referencing a folder that was already deleted from SharePoint or OneDrive.
Ensure that your computer is connected to a stable network and close any active Microsoft Office applications before attempting to reset or reinstall your OneDrive client.
Reset OneDrive and Remove Obsolete Folder Mappings
Resetting the OneDrive client forces a full sync check and helps clear out cached paths or shortcuts that might be triggering the long path error.
Often, OneDrive retains memory of deleted SharePoint or OneDrive folders through stale local shortcuts or library mappings. Resetting the app clears these ghost connections.
Press the Windows key + R simultaneously on your keyboard to open the Run command window.
Type `%localappdata%\Microsoft\OneDrive\onedrive.exe /reset` into the text box and click OK. The OneDrive icon in your system tray will disappear and reappear after a minute or two.
Open File Explorer and navigate to your OneDrive folder. Look for any shortcut icons or folders that reference the previously deleted long-path directories and delete them manually.
Launch OneDrive from your Start menu if it does not restart automatically, and allow it to perform a fresh synchronization of your files.
Shorten File Names and Move Deeply Nested Folders
Since OneDrive has a strict character limit for file paths, manually reducing the length of your file names and folder structures prevents sync failures.
Experience Seamless File Management with WPS Office
If you are frustrated with OneDrive sync limits and complex Microsoft installation errors, consider switching to WPS Office. It provides a lightweight, unified office suite with its own reliable cloud storage (WPS Cloud) that makes managing and syncing your files effortless.
- 1. Download WPS Office: Visit the official WPS website to download the free, lightweight installer.
- 2. Sign in to WPS Cloud: Create or log into your WPS account to activate your free cloud storage space.
- 3. Sync your documents: Easily upload and manage your office documents directly within the WPS Office workspace.

Frequently Asked Questions
What is the maximum file path length supported by OneDrive?
The entire decoded file path, including the file name and all folder names, cannot exceed 400 characters for OneDrive, OneDrive for Business, and SharePoint in Microsoft 365.
Why does the error occur for a folder I have already deleted?
OneDrive may still hold a cached shortcut, a library mapping, or a stale local folder on your hard drive that references the deleted path. Resetting the OneDrive app usually clears this cache.
Can I bypass the path limit by enabling long paths in Windows Registry?
Even if you enable long paths in Windows 10 or 11 Registry to bypass the 260-character local limit, OneDrive's syncing engine strictly enforces its own maximum character limit across devices. Shortening file names remains the most reliable solution.
How do I find out exactly which file path is too long in OneDrive?
Click the OneDrive cloud icon in your system tray and select 'View sync problems' or review the active error list. It will typically display the exact file or folder path that is triggering the length restriction.




