Maximum File Name Length for OneDrive for Business,
|OneDrive for Business - (OD4B)
- Local Storage
There appears to be a limit of 249 characters for Folder and File names stored in the local OD4B Folder. This limit includes the length for the OD4B Folder and its trailing backslash. This limit applies to the length of Folder names plus the length of the File names.
However, you must consider the length of the OD4B Folder name for all the systems that would Sync this data via the Microsoft Cloud.
|OneDrive for Business - (OD4B) -
There appears to be a limit of 260 characters for storing Folders and Files in the OD4B cloud. As OD4B stores your data in a SharePoint Online library, this limit should also apply to SharePoint Online.
You must limit your use of OneDrive for Business to the lesser of these
From the above, I show:
218 - Local for user ID "Jim"
212 - Local for user ID "JimLawler"
213 - Online for all users
Therefore, I have to limit my Folder names plus File names to 212. Exceeding this value will cause Sync problems for some of my systems.
NOTE - some SharePoint systems impose a limit of 128 characters for File names and 128 characters for Folder names. You need to perform your own tests for verification. See TestSPOL below.
Caution - if you are storing your data in the Shared with Everyone Folder, you must reduce your Folder plus File name length by the 21 characters that this Folder name consumes.
|OneDrive [non-business] - (ODnB)
There appears to be a limit of 259 characters for storing Folders and Files in the ODnB Folder.
OneDrive for Business stores your data in a SharePoint Document Library via a Sync function. The Document Library can be in
Microsoft's Cloud via SharePoint Online or on your own servers via
A major problem with OneDrive for Business is its Sync system. A leading cause for Sync problems relates to misunderstanding the length restrictions for File Names and Folder Names.
Available literature is not all that helpful. One can find a range of values such as:
File names can have up to 128 - 256 characters
Folder names can have up to 128 - 256 characters
Folder name / File name combinations can have up to 250 - 260 characters.
The literature is lacking in any reasonable explanations as to where or how the lengths are computed and imposed.
Actually, Windows imposes a component (File name or Folder name) length limit of 255 characters on most File systems.
My SharePrep customers are faced with the need to know the maximum permitted length values for setting the Max Length field on SharePrep's Scan and Repair window. This represents the maximum length the user can use for their File and Folder names when migrating to SharePoint.
In order to help with this, I obtained a subscription for OneDrive for Business and experimented with its length limitations.
For this purpose, I created a program, TestSPOL, to create test records. I learned that I could create and Sync Files with a name length up to 213 bytes on three of my test systems and up to 212 bytes on the fourth system. Further, I could create Folder/File combinations with the same lengths. On my test systems, there were no additional restrictions for Folder/File names.
After several days of frustration, I could find no method for calculating the length available to the user. I found a partial explanation in an old Email from a SharePrep customer based on his conversation with a Microsoft support technician.
The technician indicated that only the last portion of the Site URL beginning with "personal" is considered in calculating the overhead for storing in the Microsoft cloud.
The results from my experimenting is illustrated above.
As stated above, your results will vary from mine. I am making my test File generation program, TestSPOL, available as a Free Utility that you can use to assist you in determining your Maximum length for your Folder and File names.