Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Tip

This guide shows you how to shorten a file path in Windows. If your data is already in SharePoint or OneDrive, follow this guide: Shorten SharePoint File Path

When moving files to, or creating new files and folders within 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.

...

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.

...

...

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 SharePoint, 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 folders containing this folder; these changes will help every folder and file below it. Next, try to shorten the file name.

Method 1: Shortening the file/folder names

  1. I can shorten the picture’s name, since there is repeated information.
    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.

Method 2: Moving the folder

If shortening the file/folder names is not feasible, you may move the folder to a higher location in the file path (folder hierarchy).

  1. Locate the folder in your file manager: “File Explorer” in Windows and “Finder” in macOS.

  2. Right click on the folder and click Cut.

  3. Leave this folder and move up your folder chain (moving close to your drive’s root, so you are not inside many folders).

  4. Paste the folder at this higher level.

    Image Removed

I’m receiving file path errors from SharePoint/OneDrive

If you are receiving popup notifications about file path length issues, please read the popup to identify the file path.

Tip

Take a screenshot of the popup, or use your phone to take a picture.

  1. Navigate to s.uconn.edu/onedrive if the error is in your OneDrive and s.uconn.edu/sharepoint and if the error is in a SharePoint site.
    If you’re navigating to SharePoint, next click on the SharePoint site in questionthat is giving you the error.

  2. Click on Documents in the lefthand menu.

  3. Using the picture you took of the popup, navigate to the file path and begin to shorten it using the instructions on this guide.

Filter by label (Content by label)
showLabelsfalse
max5
showSpacefalse
cqllabel in ( "OneDrive" , "SharePoint" ) and space = currentSpace ( )