File Path Limit - OneDrive and SharePoint
When moving or creating files in OneDrive and SharePoint, you may receive an error message claiming the “file path exceeds the limit”. This guide explains what that means and how to remedy this error message.
The file path is a file’s logical location in your computer. The path contains the name of every parent folder and the file’s name. A “parent folder” is a folder that contains files and other folders. Folders within the “parent folder” are considered “child folders”.
Example file path
An example path: C:\Users\daj13007\OneDrive - University of Connecticut\Knowledge Base Guides\Big Dell Touch Monitors\User Support Guides\Full Manuals\dell monitor86 manual.pdf
. This file path contains 181 characters.
How does that add up to 181? Special characters.
Example: the apostrophe and spacebar have a hidden cost: a simple name such as “Dan’s test folder” will turn into Dan%27s%20test%20folder
. This can be shortened by using only underscores: “Dans_test_here” will turn into Dans_test_here
(no change).
This example path is very long and contains many unneeded characters.
The file path limit for OneDrive and SharePoint is 400 characters.
The limit for a single file or folder name is 255 characters.
Root | File path | File name |
|
|
|
Limit of 120 characters | Limit of 400 characters | Limit of 255 characters |
| Total limit of 400 characters | |
Total limit of 520 |
Fixing the Above Example
The file name can be shorted by removing the repeated/unneeded information:
dell monitor86 manual.pdf
can becomedell86manual.pdf
to save 13 characters.Folder names can be changed, and superfluous folders can be removed.
Shortened file path: C:\Users\daj13007\OneDrive - University of Connecticut\KB_Guides\Dell_Touch_Monitors\Support\dell86manual.pdf
with 109 characters
Changing folder names
Renaming folders is the best way to shorten file paths; shortening a folder’s name helps every file and folder in it.
In the above example, shortening “Knowledge Base Guides”, which is actually seen as Knowledge%20Base%20Guides
by the computer, to “KB_Guides” removes 16 characters from the file path for every file and folder within this folder.
Alternate: Moving Folders Closer to the Root
If you have reached the file path limit and have many files/folders that are beyond the character limit, consider moving folders closer to the root.
Right click on any of the folders within the file path in question and move the folder 'up' in the path.
Navigate to s.uconn.edu/onedrive.
Click on My Files in the lefthand menu.
Find the folder you need to move and right-click on it.
Select Move to and a popup window will appear. In this window, click on the ellipsis to view the whole file path. Click on a higher folder to move this folder closer to the root.
Click Move here once you have found the appropriate location.