You receive error messages when opening files from OneDrive

Created by Ryan Harnwell, Modified on Sun, 19 Nov, 2023 at 10:21 AM by Ryan Harnwell

When opening files from One Drive on your computer you receive one of the following error messages:

  • Filename is not valid.
  • The file could not be accessed.
  • The path you entered, 'filename', is too long. Enter a shorter path.
  • Filename could not be found. Check the spelling of the filename, and verify that the file location is correct.
  • A DDE error has occurred, and a description of the error cannot be displayed because it is too long. If the filename or path is long, try renaming the file or copying it to a different folder.
  • The action can't be completed because the folder or a file in it is open in another program


Cause


Windows has a maximum file path limitation of 260-characters and the entire filepath including the filename and file extension - which is much smaller than Sharepoint in Office365. 
If attempting to open files from OneDrive for Windows that exceeds the 260 character file system limit an error appears.

Workaround


Make sure that the path of the file contains no more than 260 characters. To do this, use one of the following methods.

  • Open the files from Sharepoint or Teams, rather than OneDrive.

Solution


The only solution to address the path length is to shorten it.


  • Try saving the file into the destination folder with a shorter name.
  • Rename one or more folders that contain the file so that they have shorter names. This must be done in SharePoint online for best results.
  • Rename the file so that it has a shorter name.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article