Shorten local OneDrive path to avoid windows path length limitations

%3CLINGO-SUB%20id%3D%22lingo-sub-34369%22%20slang%3D%22en-US%22%3EShorten%20local%20OneDrive%20path%20to%20avoid%20windows%20path%20length%20limitations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-34369%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20we%20set%20up%20OneDrive%20for%20business%2C%20we%20keep%20the%20same%20local%20path%20on%20every%20pc%3A%3C%2FP%3E%3CP%3Ec%3A%5COneDrive%3C%2FP%3E%3CP%3ESince%20our%20company%20name%20is%20quite%20long%2C%20every%20synced%20SharePoint%20will%20be%20somthing%20like%3A%3C%2FP%3E%3CP%3Ec%3A%5COneDrive%5Cveryveryverylongcompanyname%5Cproject_xxxx%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECurrently%20we%20are%20moving%20some%20local%20network%20drive%20folders%20to%20SharePoint%20or%20Outlook%20Groups%20and%20are%20facing%20path%20length%20conflicts%20due%20to%20the%20long%20base%20path.%20Any%20way%20to%20shorten%20your%20company%20name%20without%20changing%20it%20globally%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-34369%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOneDrive%20for%20Business%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-167917%22%20slang%3D%22en-US%22%3ERe%3A%20Shorten%20local%20OneDrive%20path%20to%20avoid%20windows%20path%20length%20limitations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-167917%22%20slang%3D%22en-US%22%3E%3CP%3EUsing%20LongPath%20Tool%20program%20helps%20in%20avoiding%20such%20errors.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-90792%22%20slang%3D%22en-US%22%3ERe%3A%20Shorten%20local%20OneDrive%20path%20to%20avoid%20windows%20path%20length%20limitations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-90792%22%20slang%3D%22en-US%22%3E%3CP%3EI%20had%20ran%20into%20this%20problem%20constantly%20and%20to%20do%20this%20systematically%20for%20my%20customers%20was%20a%20pain.%20So%20I%20built%20a%20tool%20to%20fix%20this%20issue.%26nbsp%3B%3CBR%20%2F%3EPath%20Too%20Long%20Auto%20Fixer%20(%3CA%20href%3D%22http%3A%2F%2Fpathtoolongautofixer.blogspot.com%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fpathtoolongautofixer.blogspot.com%2F%3C%2FA%3E)%20scans%20for%20directories%20and%20filenames%20that%20are%20longer%20and%20260%20characters%2C%20and%20auto%20shortens%20them.%20You%20have%20options%20how%20the%20shortening%20process%20works%2C%20like%20removing%20Unicode%20spaces%2C%20hyphens%2Fdashes%2C%20underscores%20and%20punctuations%20and%20more.%20Try%20demo%20for%20free.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-71934%22%20slang%3D%22en-US%22%3ERe%3A%20Shorten%20local%20OneDrive%20path%20to%20avoid%20windows%20path%20length%20limitations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-71934%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20max%20length%20is%20now%20around%20400.%20From%20my%20own%20experience%20I%20can%20say%20that%20the%26nbsp%3Bmax%20length%20in%20windows%20is%20more%20limiting.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20unable%20to%20create%20this%20long%20path%20length%20directly%20in%20Windows%2C%20I%20had%20to%20create%20the%20folders%20and%20files%20in%20OneDrive%20after%20which%20they%20were%20properly%20synced.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-71929%22%20slang%3D%22en-US%22%3ERe%3A%20Shorten%20local%20OneDrive%20path%20to%20avoid%20windows%20path%20length%20limitations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-71929%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F7187%22%20target%3D%22_blank%22%3E%40bart%20vermeersch%3C%2FA%3E%3C%2FP%3E%3CP%3Eyes%2C%20today%20on%20a%20Windows%2010%2014393.1198%20machine.%20Pathlengs%20somehow%20exceeded%20the%20limit.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhere%20should%20the%20limit%20be%20nowadays%3F%20Is%20the%20rollout%20global%20yet%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-71881%22%20slang%3D%22en-US%22%3ERe%3A%20Shorten%20local%20OneDrive%20path%20to%20avoid%20windows%20path%20length%20limitations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-71881%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20maxmimum%20path%20length%20has%20been%20increased%20(doubled)%20recently.%20Have%20you%20tried%20syncing%20in%20the%20last%20few%20weeks%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-71862%22%20slang%3D%22en-US%22%3ERe%3A%20Shorten%20local%20OneDrive%20path%20to%20avoid%20windows%20path%20length%20limitations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-71862%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F8497%22%20target%3D%22_blank%22%3E%40Stefano%20Conti%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethanks%20for%20the%20solution.%20Unfortunately%20%3CSTRONG%3Echanging%20the%20organization%20name%20also%20changes%20the%20billing%20name%20%3C%2FSTRONG%3Esince%20it%20is%20global.%20Thus%20I%20(currently)%20may%20not%26nbsp%3Bshorten%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-39607%22%20slang%3D%22en-US%22%3ERe%3A%20Shorten%20local%20OneDrive%20path%20to%20avoid%20windows%20path%20length%20limitations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-39607%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3Esince%20yesterday%20afternoon%20I%20successfully%20changed%20(renamed)%20Onedrive%20name%20in%205%20pc.%3C%2FP%3E%3CP%3EHere%20the%20complete%20working%20procedure%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3E%3CP%3Eexit%20One%20drive%20app%20(on%20icon%20bottom%20right%2C%20mouse%20dx%20%26gt%3B%20exit)%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3Erename%20one%20drive%20folder%20from%3C%2FP%3E%3CP%3E%22OneDrive%20-%20OldVeryLongNameCompany%22%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20to%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22OneDrive%20-%20%3CSTRONG%3ECOMPANY%3C%2FSTRONG%3E%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EIMPORTANT%3A%3C%2FSTRONG%3E%20the%20new%20%22%3CSTRONG%3ECOMPANY%3C%2FSTRONG%3E%22%20name%20was%20previously%20set%20in%20O365%20Admin%20pane%20(gear%20icon%20%26gt%3B%20Organization%20profile%20%26gt%3B%20name%20othe%20Organization.%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3Erestart%20pc.%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3Eonedrive%20app%20auto-start%20but%20does%20not%20find%20the%20previous%20folder.%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3Ea%20box%20appears%3A%20RETRY%20or%20CONFIGURE.%20--%26gt%3B%20CONFIGURE%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EInput%20your%20credentials%20(O365%20account%2C%20then%20password)%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EOneDrive%20suggest%20to%20use%20the%20new%20renamed%20folder%20(into%20which%20of%20course%20file%20are%20yet%20in).%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EChoose%20%22use%20this%20position%22%20option%20(or%20similiar)%3C%2FP%3E%3C%2FLI%3E%3CLI%3EOneDrive%20requires%20to%20specify%20which%20folders%20and%20files%20you%20want%20to%20sync.%3CBR%20%2F%3EIn%20my%20case%20I%20wanted%20to%20keep%20synched%20all%20files%20and%20folders.%20--%26gt%3B%20go%20ahead%3C%2FLI%3E%3CLI%3Ethe%20sync%20start.%20You%20can%20check%20the%20status%20on%20icon%20bottom%20right%2C%20initially%20with%20double-arrow%2C%20but%20soon%20it%20disappears.%3C%2FLI%3E%3CLI%3EIn%20any%20of%20our%20case%20%3CU%3Eno%20further%20sync%20was%20necessary%3C%2FU%3E.%20It%20just%20compares%20the%20local%20and%20remote%20files%20information.%20It%20took%20about%205'%20to%20check%204GB%20data%20(5.000%20files).%3C%2FLI%3E%3CLI%3EOnce%20finished%2C%20probably%20the%20%22OneDrive%20-%20%3CSTRONG%3ECOMPANY%3C%2FSTRONG%3E%22%20folder%20will%20show%20all%20file%20still%20in%20sync%20(double%20arrow)%2C%20while%20the%20bottom%20right%20icon%20seems%20to%20have%20finished.%20--%26gt%3B%20RESTART%20PC.%3C%2FLI%3E%3C%2FOL%3E%3CP%3EEnjoy%20!%3C%2FP%3E%3CP%3EStefano%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-39440%22%20slang%3D%22en-US%22%3ERe%3A%20Shorten%20local%20OneDrive%20path%20to%20avoid%20windows%20path%20length%20limitations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-39440%22%20slang%3D%22en-US%22%3E%3CP%3EAny%20hint%20%2F%20solution%20anyone%3F%3C%2FP%3E%3CP%3EEven%20with%20the%20new%20client%2C%20renaming%20the%20base%20path%20is%20not%20possible.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-35062%22%20slang%3D%22en-US%22%3ERe%3A%20Shorten%20local%20OneDrive%20path%20to%20avoid%20windows%20path%20length%20limitations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-35062%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F8497%22%20target%3D%22_blank%22%3E%40Stefano%20Conti%3C%2FA%3E%3C%2FP%3E%3CP%3ESadly%20that%20doesn't%20work%20for%20me.%20When%20I%20change%20the%20folder%20and%20restart%2C%20I%20will%20get%20the%20following%20error%20message%20and%20the%20client%20will%20create%20new%20folders%20and%20resync%20the%20whole%20data%20afterwards%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20380px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F9249i3367F538368A8CF3%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Unbenannt.PNG%22%20title%3D%22Unbenannt.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EClient%20version%20.1122%2C%20Windows%207%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-34831%22%20slang%3D%22en-US%22%3ERe%3A%20Shorten%20local%20OneDrive%20path%20to%20avoid%20windows%20path%20length%20limitations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-34831%22%20slang%3D%22en-US%22%3E%3CP%3Esuccessfully%20done%20this%20in%20my%20pc%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1)%20exit%20One%20drive%20app%20(on%20icon%20bottom%20right%2C%20mouse%20dx%20%26gt%3B%20exit)%3C%2FP%3E%3CP%3E2)%20rename%20one%20drive%20folder%20from%20%22%2Fvvvveerrrrrrrrryyyyyyyyyyy-llllllllllloooooooonnnnnnnnnngggggggg%22%20...%20to%20%22work%22%20or%20something%20..%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E3)%20restart%20pc.%3C%2FP%3E%3CP%3E4)%20the%20onedrive%20app%20start%20to%20compare%20the%20folder%20content%20with%20the%20online%20one.%3C%2FP%3E%3CP%3EIn%20my%20case%20almost%20immediately%20confirm%20the%20structure%20and%20file%20prescence%20(surely%20not%20re-downloaded%204GB..)%3C%2FP%3E%3CP%3Ebye%20!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-34391%22%20slang%3D%22en-US%22%3ERe%3A%20Shorten%20local%20OneDrive%20path%20to%20avoid%20windows%20path%20length%20limitations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-34391%22%20slang%3D%22en-US%22%3E%3CP%3EMay%20not%20be%20a%20solution%20but%20information%20but%20with%20Windows%2010%20build%201607%20(Anniversary%20Edition)%2C%20the%20file%20path%20limitation%20of%20the%20OS%20has%20been%20lifted%20to%2032%2C767%20giving%20plenty%20of%20space%20to%20stretch%20those%20file%20paths%26nbsp%3Bout.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1107447%22%20slang%3D%22en-US%22%3ERe%3A%20Shorten%20local%20OneDrive%20path%20to%20avoid%20windows%20path%20length%20limitations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1107447%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F51%22%20target%3D%22_blank%22%3E%40Hans%20Brender%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20currently%20reran%20into%20this%20problem.%20Anyone%20found%20a%20solution%20to%20change%20the%20company%20name%20without%20changing%20the%20billing%20name%3F%20Or%20at%20least%20change%20the%20company%20name%20f%C3%BCr%20OneDrive%20only%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESame%20topic%20here%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fonedrive-for-business%2Fhow-can-i-force-onedrive-to-use-a-new-company-name-so-i-have-a%2Fm-p%2F215712%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fonedrive-for-business%2Fhow-can-i-force-onedrive-to-use-a-new-company-name-so-i-have-a%2Fm-p%2F215712%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1294741%22%20slang%3D%22en-US%22%3ERe%3A%20Shorten%20local%20OneDrive%20path%20to%20avoid%20windows%20path%20length%20limitations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1294741%22%20slang%3D%22en-US%22%3E%3CP%3ELong%20PathTool%20is%20a%20software%20that%20will%20let%20you%20easily%20delete%2C%20copy%20or%20rename%20long%20path%20files.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

When we set up OneDrive for business, we keep the same local path on every pc:

c:\OneDrive

Since our company name is quite long, every synced SharePoint will be somthing like:

c:\OneDrive\veryveryverylongcompanyname\project_xxxx

 

Currently we are moving some local network drive folders to SharePoint or Outlook Groups and are facing path length conflicts due to the long base path. Any way to shorten your company name without changing it globally?

 

13 Replies
Highlighted

May not be a solution but information but with Windows 10 build 1607 (Anniversary Edition), the file path limitation of the OS has been lifted to 32,767 giving plenty of space to stretch those file paths out.

Highlighted

successfully done this in my pc:

 

1) exit One drive app (on icon bottom right, mouse dx > exit)

2) rename one drive folder from "/vvvveerrrrrrrrryyyyyyyyyyy-llllllllllloooooooonnnnnnnnnngggggggg" ... to "work" or something .. :)

3) restart pc.

4) the onedrive app start to compare the folder content with the online one.

In my case almost immediately confirm the structure and file prescence (surely not re-downloaded 4GB..)

bye !

Highlighted

@Stefano Conti

Sadly that doesn't work for me. When I change the folder and restart, I will get the following error message and the client will create new folders and resync the whole data afterwards:

Unbenannt.PNG

 

 

Client version .1122, Windows 7

Highlighted

Any hint / solution anyone?

Even with the new client, renaming the base path is not possible.

Highlighted

Hi all,

since yesterday afternoon I successfully changed (renamed) Onedrive name in 5 pc.

Here the complete working procedure :

 

  1. exit One drive app (on icon bottom right, mouse dx > exit)

  2. rename one drive folder from

    "OneDrive - OldVeryLongNameCompany"     to     "OneDrive - COMPANY"

     

    IMPORTANT: the new "COMPANY" name was previously set in O365 Admin pane (gear icon > Organization profile > name othe Organization.

  3. restart pc.

  4. onedrive app auto-start but does not find the previous folder.

  5. a box appears: RETRY or CONFIGURE. --> CONFIGURE

  6. Input your credentials (O365 account, then password)

  7. OneDrive suggest to use the new renamed folder (into which of course file are yet in).

  8. Choose "use this position" option (or similiar)

  9. OneDrive requires to specify which folders and files you want to sync.
    In my case I wanted to keep synched all files and folders. --> go ahead
  10. the sync start. You can check the status on icon bottom right, initially with double-arrow, but soon it disappears.
  11. In any of our case no further sync was necessary. It just compares the local and remote files information. It took about 5' to check 4GB data (5.000 files).
  12. Once finished, probably the "OneDrive - COMPANY" folder will show all file still in sync (double arrow), while the bottom right icon seems to have finished. --> RESTART PC.

Enjoy !

Stefano

Highlighted

Hi @Stefano Conti,

 

thanks for the solution. Unfortunately changing the organization name also changes the billing name since it is global. Thus I (currently) may not shorten it.

Highlighted

The maxmimum path length has been increased (doubled) recently. Have you tried syncing in the last few weeks?

Highlighted

@bart vermeersch

yes, today on a Windows 10 14393.1198 machine. Pathlengs somehow exceeded the limit.

 

Where should the limit be nowadays? Is the rollout global yet?

 

Highlighted

The max length is now around 400. From my own experience I can say that the max length in windows is more limiting.

 

I was unable to create this long path length directly in Windows, I had to create the folders and files in OneDrive after which they were properly synced.

Highlighted

I had ran into this problem constantly and to do this systematically for my customers was a pain. So I built a tool to fix this issue. 
Path Too Long Auto Fixer (http://pathtoolongautofixer.blogspot.com/) scans for directories and filenames that are longer and 260 characters, and auto shortens them. You have options how the shortening process works, like removing Unicode spaces, hyphens/dashes, underscores and punctuations and more. Try demo for free.

 

Highlighted

Using LongPath Tool program helps in avoiding such errors.

Highlighted

@Hans Brender 

I currently reran into this problem. Anyone found a solution to change the company name without changing the billing name? Or at least change the company name für OneDrive only?

 

Same topic here:

https://techcommunity.microsoft.com/t5/onedrive-for-business/how-can-i-force-onedrive-to-use-a-new-c...

Highlighted

Long PathTool is a software that will let you easily delete, copy or rename long path files.