Rename OneDrive for Business folder in Explorer

After installing Office 365, I have a new special folder in Explorer called "OneDrive - Company Name LLC".

I found a registry key at Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace whose value matches that text (and it's the only match in the registry), and I confirmed previously that deleting it will remove the entry from Explorer, so I assumed I could rename it here. However, it does not seem to work. I changed the value and even rebooted, but the display value did not change.

How can I rename my personal OneDrive folder?


Background/reasoning:

I have synced a Sharepoint document library as a public share of sorts. It shows up as "Company Name LLC". My personal OneDrive shows up as "OneDrive - Company Name LLC". This has already led to confusion with some employees. They thought they were putting files in a public space but were not. Ideally it would be named something like "OneDrive - Personal Folders".


Solution 1:

This is a hacky, but the only working solution:

  1. First, close OneDrive: Click the icon in the taskbar, select More... then Close OneDrive
  2. Next open Registry Explorer: Press Win + R, then type regedit and hit enter.
  3. Press Ctrl + F to search for all occurrences of OneDrive - <Company> and replace these with the new desired name.
  4. For all files in C:\Users\<user>\AppData\Local\Microsoft\OneDrive (i.e., enter %AppData%\..\Local\Microsoft\OneDrive in the address bar) and subfolders, replace all occurrences of OneDrive - <Company> with the new desired name.
  5. Rename your original OneDrive - <Company> folder to the new desired name.
  6. Reopen OneDrive.
  7. OneDrive might realize that the folder name has been change and will ask to set up the OneDrive folder again. Do not do this or else your work will be reverted!

Consider voting for the Rename-OneDrive-Root-Folder feature on UserVoice:

  • https://onedrive.uservoice.com/forums/913522-onedrive-on-windows/suggestions/37945567-allow-users-to-change-the-onedrive-folder-director
  • https://onedrive.uservoice.com/forums/913522-onedrive-on-windows/suggestions/8729746-allow-onedrive-for-business-folder-to-be-renamed

Solution 2:

There are some good answers here, and since they're scattered I made this post to include the whole process and procedure in addition to what is missing.


Process

  • Close OneDrive (step 1 below)
  • Rename OneDrive folder (step 2 below)
  • (optional) Move the OneDrive folder to the desired location (step 3 below)
  • Modify the relevant registry keys (steps 4-5 below)
  • Modify the configuration file (steps 6-8 below)

Procedure

  1. Close OneDrive.
  2. Rename the OneDrive folder.
  3. (optional) Move the OneDrive folder to the desired location.
  4. Open the registry (start menu >> search "regedit")
  5. Modify the OneDrive folder or path in the following locations: (or follow @xoxox advice and search for "OneDrive - (company name)"

In HKEY_CURRENT_USER (HKCU) (4 locations)

HKCU\Software\Microsoft\OneDrive\Accounts\Business1\UserFolder
HKCU\Software\Microsoft\OneDrive\Accounts\Business1\ScopeIdToMountPointPathCache\(ID)
HKCU\Software\Microsoft\OneDrive\Accounts\Business1\Tenants\(name)\(path)
HKCU\Software\SyncEngines\Providers\OneDrive\(ID)\MountPoint

In HKEY_LOCAL_MACHINE (HKLM) (2 locations)

HKLM\SOFTWARE\Microsoft\Security Center\Provider\CBP\(ID)\NAMESPACE
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SyncRootManager\OneDrive!(ID)\UserSyncRoots\(SID)

  1. Open the following location: %UserProfile%\AppData\Local\Microsoft\OneDrive\settings\Business1
  2. Locate the (ID).ini file (usually it's the 2nd file) and edit it (right click >> edit)
  3. Locate the OneDrive path in the first line (in the value of the libraryScope parameter) and modify it to be as the new path. Then save the file.
  4. Open OneDrive.

Notes
In step 5 above, some parameters are quoted (e.g. (name), (ID), (path)) - that means that these parameters are interchangeable, and there should be some value that is probably unique to your case.


Reference
Changing your onedrive name in file explorer navigation
How can I change default name of OneDrive for Business folder?

Solution 3:

You can change this in the registry through the following:

Find the folder name of the OneDrive synced folder in

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{018D5C66-4533-4307-9B53-224DE2ED1FE6}

Now navigate to HKCR\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6} and change the (Default) string entry with the name of your choice.

This change would immediately be visible.