---
title: "TESTOneDrive - File Path Limit"
canonical: "https://kb.uconn.edu/space/IKB/26258081731/TESTOneDrive%20-%20File%20Path%20Limit"
format: markdown
---
When moving files to, or creating new files and folders within OneDrive and SharePoint, you may receive an error message claiming the “file path exceeds the limit”. This guide shows the technical explanation of file paths, so that you may apply this knowledge to your file organization, both online and on your computer.

The **file path** of a file contains the file’s name and the name of every parent folder. A “parent folder” is a folder that contains the file in question. An example file path (finding a file within parent folders) is shown below. You can see the file path generating in the address bar above the folders.

![image](media://c8f45eed-1caf-489f-b0b7-b9fbef67a13e)

For example, you may have a picture saved in your default Windows Pictures folder on your computer named “vacation group photo Dec25th.jpg” The file path of this picture file is `C:\Users\daniel\Pictures\camera\vacations\Dec_2012_Vacation_to_Denver\lodge\vacation_group_photo_Dec25th2012.jpg`. This file path contains 112 characters and 7 parent folders. You can see the name of your hard drive `C:\` and then the name of every folder you need to enter in order to find your file. 

### Tips for shortening a file path

- The file path limit for OneDrive and SharePoint is **400 characters**.** **
- The limit for a file or folder name is **255 characters**.
- Try to exclude spaces from file and folder names. A space in a file path will be replaced by `%20` in OneDrive, which is now 3 characters instead of a single space as you see it. Try using the underscore `_` in place of a space.
- Start with renaming the file in question. If you still need to free up space, start with a top-level parent folder to prevent issues in the future.

### Fixing the above example

1. I can shorten the picture’s name, since there is repeated information.
  1. `group_photo` does not duplicate any information and contains 11 characters instead of 32. The date-taken information is included within the file’s metadata; it does not need to be in the name.
2. I can remove the “camera” folder. By moving all the sub-folders of `camera` to `Pictures`. I will save 7 characters in all future sub-folders.
3. Looking at the remaining file path, the logical parent folder to edit is “Dec 2012 Vacation to Denver” I can change this to `Denver2012` or `Denver_Dec2012` to save 17 and 13 characters respectively.

> ✅ Fixed file path: `C:\Users\daniel\Pictures\vacations\Denver2012\lodge\group_photo.jpg` with 67 characters.

## Related Articles

> Macro (contentbylabel)