Rename OneDrive for Business folder in Explorer

79,177

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 %LocalAppData%\Microsoft\OneDrive in the address bar) and subfolders, replace all occurrences of OneDrive - <Company> with the new desired name. (This can be achieved with Notepad++ by selecting Search > Find in Files... from the menu)
  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:

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

How about this:

mklink /J your_desired_name "OneDrive - Company Name LLC"

Solution 4

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.

Solution 5

@the-joatmon is 100% correct: end users confuse their private onedrive folders for the companies' folders.

It annoyed me enough that I came with an easy solution that works for me: Hide OneDrive on the explorer left pane. To do so, use regedit --

navigate to: HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID and search for: System.IsPinnedToNameSpaceTree Than change the DWORD value from 1 to 0

Then to see the effect, kill explorer in Task Manager and restart it.

Typically OneDrive syncs Documents and Pictures that are pinned to QuickAccess, so there is no reason to see them twice.

If your users have other folders that are synced, I suggest pinning them also to Quick access. Finally to cleanup I prevent Explorer from adding recently visited folders to Quick access by

right click Quick access on left pane in explorer select Options and uncheck: Show frequently used folders in Quick access

Share:
79,177

Related videos on Youtube

THE JOATMON
Author by

THE JOATMON

Hobbies include off-roading, gaming, reading and infuriating SO users by attempting to write code myself. "I must create a system, or be enslaved by another man's; I will not reason and compare: my business is to create." - William Blake

Updated on September 18, 2022

Comments

  • THE JOATMON
    THE JOATMON 3 months

    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".

  • THE JOATMON
    THE JOATMON over 4 years
    Well that sucks. See my update for why.
  • THE JOATMON
    THE JOATMON almost 3 years
    Exactly what is the expected outcome of this? It created a junction, but there is no new entry in Explorer.
  • uriel
    uriel almost 3 years
    You may need to open CMD as administrator. And check if the link was created in the path where the CMD was tuned.
  • Marquinho Peli
    Marquinho Peli almost 3 years
    Doesn't work on my side
  • JoeFletch
    JoeFletch almost 3 years
    This worked fro me, but the answer is not completely clear. You need to navigate to HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desk‌​top\NameSpace** to find the key(s) for your folders. Then you need to navigate to **HKCR\CLSID\{key-values} and then change the default text here.
  • ak112358
    ak112358 over 2 years
    Perhaps a workaround, but does not answer the question
  • Tung
    Tung over 2 years
    Looks like it works blog.jongallant.com/2020/01/…
  • Oz Edri
    Oz Edri over 2 years
    It's not working. Just to be on the same page, I read Bashan's, JW0914's, and JoeFletch comments. Seems like JoeFletch is closer, but it still didn't work and the name remained the same as it was regardless the rename in the registry keys
  • Oz Edri
    Oz Edri over 2 years
    That was almost enough. Another thing is to change the path in the libraryScope parameter in C:\Users\oze\AppData\Local\Microsoft\OneDrive\settings\Busin‌​ess1\<ID>.ini where <ID> is the ID
  • ManSamVampire
    ManSamVampire over 2 years
    I followed all the steps here and replaced all occurrences in the registry (Which included the ones in HKCU and a few in HKLM as well) and also in the config files. Then, I restarted Windows Explorer before reopening the OneDrive app. The Explorer did show the new name and did open the folder in the new location. However when I opened the OneDrive app, it changed back all the occurrences of my new name back to the old one (it didn't ask me to set up anything again, did everything silently). I cannot find my changed name in the registry anymore. I'm using OneDrive version 20.084.0426.0007.
  • ManSamVampire
    ManSamVampire over 2 years
    However this did help me change the name of my destination folder for OneDrive, thanks! Upvoted! It should be sufficient to change all occurrences of the original path C:\Users\USERNAME\OneDrive - Business name for this purpose, there's no need to change anything else.
  • ManSamVampire
    ManSamVampire over 2 years
    This answer is great for changing the path to the folder, but unfortunately not the company name that appears in the Explorer sidebar (OneDrive resets it to the original one - also mentioned in my comment here.) Also, in addition to the above mentioned keys, it is good practice to also change the value of the OneDriveCommercial environment variable to point to the new path, so that apps and scripts that depend on it, are not broken: HKEY_CURRENT_USER\Environment\OneDriveCommercial
  • pepoluan
    pepoluan over 2 years
    This answer works! Thank you! I did have to ensure that BITS (Background Intelligent Transfer Service) is not running before I can rename the folder. And to be really careful, instead of just re-opening OneDrive, I restarted my computer.
  • Nottingham Man about 1 year
    It reverts to the old name (in explorer)
  • qdread
    qdread about 1 year
    This is an adequate workaround for my needs, which is simply to have a path to the onedrive folder without spaces or capitalization in it.
  • DifferentPulses
    DifferentPulses 10 months
    Clean and good working solution. This answer is not appreciated enough.