Possible Bug - OneDrive File Length


#1

I am getting the following error when trying to sync a file:

H:\drOneDriveLocal\music\Rhythm & Notes with music from The Music Class\Pre-K-KB\06 Rhythm & Notes with music from The Music Class - The Old Grey Cat (Roby Sayer, Frank & Mary Hamilton, Eileen Benator, Renee Roscoe-Morrison, Carol Borowiec).mp3
The length of the filename exceeds Microsoft OneDrive’s maximum limit.

Based on https://support.office.com/en-us/article/invalid-file-names-and-file-types-in-onedrive-onedrive-for-business-and-sharepoint-64883a5d-228e-48f5-b3d2-eb39e07630fa#filenamepathlengths, the maximum limit is 400 characters.

When I take that path and run the following on a Linux box, I get 245 characters:

echo “H:\drOneDriveLocal\music\Rhythm & Notes with music from The Music Class\Pre-K-KB\06 Rhythm & Notes with music from The Music Class - The Old Grey Cat (Roby Sayer, Frank & Mary Hamilton, Eileen Benator, Renee Roscoe-Morrison, Carol Borowiec).mp3” | wc -m

Finally, I am able to copy the file and paste it into my OneDrive folder on my computer without issues. This tells me that the file is within the limit.

Thoughts?

Thanks.


#2

Hi @psell766,
This was an issue we encountered a while ago with their API where the length of the actual filename (vs the entire file path), was being limited to 135-136 characters, depending on if it was in the root, or not. I’ll see if we can take another look at this to see if it has since been resolved on OneDrive’s end.


#3

Thanks Tony. I also stumbled across the following article:

I am sure you guys are already aware of all the API stuff :slight_smile: but it was a good read for me to see the difference in the API path.


#4

Tony and Team, I was wondering if this was fixed? I noticed that I don’t have any files listed under “Not Allowed”. Thanks.


#5

Hi @psell766,
Yes! We recently pushed out a fix that increased the character limit check. We forgot to add it to the release notes, however.