How can I change the OneDrive directory to my User directory?

3

1

I want OneDrive to make my user directory (C:\Users\Raj) its base directory.

I'm on Windows 7 x64, and its latest stable OneDrive build (17.3.6201.1019) on a Personal OneDrive account.

Raj

Posted 2015-12-09T19:41:23.620

Reputation: 290

Should be as simple as setting the directory from within the OneDrive client configuration options window – Ramhound – 2015-12-09T19:48:44.270

@Ramhound, "Should be", +1 – Raj – 2015-12-09T19:49:41.313

When you install OneDrive on your PC it automatically makes the path C:\Users\User\OneDrive. Is that what you are trying to achieve? Otherwise dumping documents into the root of your user folder will create a mess. – CharlieRB – 2015-12-09T21:51:27.147

@CharlieRB, Sorry to confuse you, I want to maintain the hierarchy of the user directory. I want C:\Users\Raj to be shared as OneDrive's root folder. All necessary OneDrive directories would be maintained within C:\Users\Raj, of course. – Raj – 2015-12-09T22:09:05.887

3It's a bad idea because of C:\Users\Raj\AppData.  Windows dumps lots of stuff in there, and you probably don't want all of it to be sent out to the network. – G-Man Says 'Reinstate Monica' – 2015-12-10T06:59:52.133

@G-Man, OneDrive gives the option to "Choose what folders to sync" within the OneDrive root. Any folder I add into the OneDrive root directory can optionally be shared or not. – Raj – 2015-12-10T16:33:04.890

2That sounds like a terrible idea. Why not just move the Documents folder and whatnot to the OneDrive folder? The profile directory contains (in its “root“) the HKCU registry. This is security critical and OneDrive could interfere with its proper use. – Daniel B – 2015-12-11T20:49:41.530

@DanielB, why does it sound terrible? The files/folders in OneDrive's root are optionally syncable. Furthermore, I am interested in keeping Desktop directory synced as well. – Raj – 2015-12-11T21:07:23.517

have you considered using symbolic links?

– MrDeanosupreamo – 2015-12-14T02:16:41.623

@MrDeanosupreamo, no I haven't. But if that would resolve the issue, please add your answer. – Raj – 2015-12-14T15:53:05.033

Answers

1

Maybe you're looking at the problem the wrong way. You can change the location of your user profile directory if you follow the instructions on the page here: http://www.sevenforums.com/tutorials/87555-user-profile-change-default-location.html

IronWilliamCash

Posted 2015-12-09T19:41:23.620

Reputation: 1 314

0

In case my first answer doesn't do what you want. You can also change the One Drive (for business) base directory in the following registry key:

HKEY_USERS\$YOUR USER$\Software\Classes\Microsoft\Office\$VERSION$\Common\Internet\LocalSyncClientDiskLocation

Do this at your own risk though, as I have not tested it.

IronWilliamCash

Posted 2015-12-09T19:41:23.620

Reputation: 1 314

0

OneDrive will only allow you to sync a selected file (Default for me was C:\user\Dean\OneDrive), Creating a Symbolic link Between your user profile and a given file will allow you to upload your user profile.

To do this you will need to relocate your OneDrive file by either setting its location when you install and login to the OneDrive desktop app or UN-linking your account from a preinstalled OneDrive installation and changing the location while logging into OneDrive.

(Note: Ensure the OneDrive file is NOT located within your user profile)

Finally create a Symbolic link using this command MKLINK /j "C:\ONEDRIVEPATH\YOURNAME" "C:\user\YOURNAME"

for more information refer to Change the location of your OneDrive folder and Typing the command MKLINK /? into windows command prompt.

MrDeanosupreamo

Posted 2015-12-09T19:41:23.620

Reputation: 175