How to Fix OneDrive Files When the Folder Path Is Too Long
Question details
The user needs to resolve an issue where OneDrive files cannot be opened or restored due to the file path exceeding system character limits.

- Product
- Microsoft OneDrive
- Device & OS
- Windows
- Scenario
- The user has changed the OneDrive sync location or is attempting to restore deeply nested files to their local drive.
- Observed behavior
- OneDrive files become unavailable, and an error message indicates that the path name is too long when trying to restore or sync files.
Verify that your computer has an active Internet connection, as online-only files (marked with a blue cloud icon) require internet access before they can be opened, modified, or restored.
Shorten File Names and Move the Sync Folder
The most reliable way to fix path length issues is to reduce the number of characters in your file and folder names or move the parent folder closer to the root drive.
Windows has a traditional maximum path length of 260 characters. When a file path (which includes the drive letter, all parent folders, the file name, and the extension) exceeds this limit, OneDrive cannot sync or restore the file properly.
Open File Explorer and navigate to your main OneDrive sync folder on your local drive.
If your OneDrive folder is buried deep within other directories (e.g., C:\Users\Username\Documents\Work\Projects\OneDrive), consider unlinking OneDrive and moving the sync folder directly to the root of your drive (e.g., C:\OneDrive).
Right-click on deeply nested folders or files with overly long names and select 'Rename'. Use shorter, more concise names to bring the total path length under 260 characters.

Enable Long Paths in Windows via Registry Editor
For Windows 10 (version 1607) and later, you can bypass the default 260-character limit by enabling long path support in the system registry.
Manage and Edit Your Files Seamlessly with WPS Office
If you are encountering persistent sync issues or path-length limitations with Microsoft services, consider using WPS Office. It is a lightweight, fully compatible office suite that includes its own efficient cloud storage solution to keep your documents safe and accessible.
- 1. Download the Installer: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install WPS Office: Run the downloaded installer file and follow the simple on-screen instructions to complete the setup.
- 3. Sign In for Cloud Access: Launch WPS Office and sign in to activate your free WPS Cloud space, allowing you to seamlessly save and access files anywhere.

Frequently Asked Questions
What does the blue cloud icon next to my OneDrive files mean?
A blue cloud icon indicates that a file or folder is available 'online-only'. These files do not use space on your local hard drive. However, you must have an active Internet connection to open, view, or restore them to your device.
What is the maximum file path length limit in Windows?
By default, the Windows API limits file paths to 260 characters. This total length includes the drive letter, all parent folder names, the file name, and the file extension (for example, C:\Folder\File.txt).
Why do I get a path limit error when restoring files if my internet is working?
An active internet connection allows OneDrive to communicate with the cloud, but the local Windows operating system still enforces the 260-character limit when saving the restored file to your hard drive. If the file path is too long, the download and restore process will fail.




