by

Fixing error: Filename too long using SkyDrive Pro

SkyDrive Pro is an awesome piece of software. It comes together with Office 2013. However you might run into this little error screen I found the other day. I am sharing here the solution that worked for me.
sky-drive-pro-filename-too-long-error

 

Option 1: Old OneDrive/SkyDrive Structure

Download the “Long Path Tool” to fix this issue. This tool essentially renames the folder structure to use shorter names in order to fit the old requirements for SkyDrive. 

Option 2: Fix in 7 Steps in the OneDrive

1) Close all Microsoft Office applications. This includes Office apps in Windows 8 ( Lync For Windows 8 for example )
2) In the task bar, pause the Office Upload Center
    sky-drive-pro-filename-too-long-error-3
3) In the task bar, close the SkyDrive Pro icon
    sky-drive-pro-filename-too-long-error-2
4) Delete all the files from c:\<your username>\AppData\Local\Microsoft\Office\Spw
5) Delete all the files from c:\Users\<your username>\AppData\Local\Microsoft\Office\15.0\OfficeFileCache
6) Reboot the machine
7) When the system is back up again, try to add the URL to SkyDrive Pro. You should (hopefully) see your documents now being downloaded ok.
sky-drive-pro-filename-too-long-error-4 sky-drive-pro-filename-too-long-error-5

 

Bonus: Explaining the SharePoint Long File Name Limitation

SharePoint is a great product, but it has some very annoying aspects..and the way the document urls are formed is one of them. Basically a typical SharePoint URL rule is: http address + folder + file name + a whole bunch of parameters. The URL below is a typical example of a SharePoint 2010 URL
There is a design limitation in SharePoint that the maximum size of URL is 1950 bytes. Anything larger than that will be truncated by the SharePoint. SharePoint will start truncating the URL by the reference from the visited page, not from the destination page.
When the truncating happens and affects the destination, one might see the message "The specified file or folder name is too long". One of the examples is when you try to create a document library in a URL that has several nested levels. So, you will start realizing that there are fixed limits for the lengths of folders and document names in URLs.
Turns out that the maximum URL for files and folders in SharePoint must be less than 260 characters. It gets worse because additionally to that, there is a limit for specific file names of 128 characters.
Having said that, let's not confuse this with...

 

Browser Limitations

To complicate things even more, browsers have limitations of their own apart from SharePoint limitations. So, even if you find a shorter name and URL which is well inside the SharePoint capabilities, the browser you are using still might not be able to resolve the URL. For example, depending on the charset, IE8 restrict the limits up to 1024 characters in the URL (which well below the supported by SharePoint). Solution? try to create URLs well below 1Kb in size. The most restrictive rule wins.
What the W3C says? there is no requirements for the length in the specification. It really comes down to the implementer (Microsoft, Firefox, Google Chrome etc.) to handle that, I guess.

 

Take Away From This

  • There is no way around long document names: find a shorter name.
  • There is no way around long URLs: try to create an enterprise architecture that has the most restrictive options
I hope this info is useful for you somehow.

By