"Your OneDrive folder can't be created in the location you selected" error when moving OneDrive to C drive

I have Windows 10 version 2004 (build 19041.746) on my desktop computer My OneDrive version is 2021 (Build 20.219.1029.007)

I have OneDrive folder at default: C:\Users\MyUsername\OneDrive I want to move OneDrive to C:\OneDrive. So I select OneDrive Settings - Unlink PC, then log in to my OneDrive account again and chose C as the folder location. I got the message "Your OneDrive folder can't be created in the location you selected". enter image description here

I tried to move it to a secondary drive (D:\OneDrive) and it worked without issues.

I tried to delete all OneDrive settings from regedit - HKEY_CURRENT_USER\Software\Microsoft\OneDrive

I checked the security settings of C drive and it shows this (I am an adminstrator)

enter image description here

By the way the security settings of my D drive is the same:

enter image description here

I had AVG Anti-virus installed, but I Turned it off. I also added OneDrive to the list of Exception apps.

I successfully moved OneDrive to C drive in other computers before.

A strange observation After I unlink PC from my OneDrive and closed the app, I reopened it. OneDrive logs into a particular user automatically. This user is NOT the user that I last logged in with, but the user before that. And the folder location is back to C:\Users\MyUsername\OneDrive, not D:\OneDrive like for the previous user.

It seems strange. It is more logical for the app to prompt the user to log in again, just like after I click Unlink PC.


This is a known issue with many possible causes. You could also simply try this:

  1. Go to C:/ in your Windows Explorer
  2. Create a new folder called "OneDrive"
  3. Now go back to OneDrive app. Try to sign in and choose C:/ again.

See if that works.