1

I want OneDrive to have the exact files and folder structure of a folder on my local computer. Syncing OneDrive causes the files in the cloud to download and only uploads files that I add to the local folder while the OneDrive app is running. How can I make the local folder unchangeable and the Cloud folder mirror from the local folder by uploading local files that aren't in the cloud and replacing or duplicating the files into the cloud from local files that have the same name and location in both local and cloud drives and different hash values?

Please note: The folder is almost 160 gigs and I currently only have access to a very slow connection so I have to keep the files that are already uploaded and can't just recopy the entire folder into the cloud like when I had fiber optic. The folder contains 18,873 Files so manually comparing files is also not possible.


To future readers with the same problem: Using the command net use described in the duplicate problem will not allow replacing the cloud version with the local version because it maps the drive as if using the onedrive app(where OneDrive automatically downloads synced folders:

enter image description here

Whereas the way described below maps the drive as I needed: enter image description here

  • @T No, the only way to upload new files in one drive that I know of is to add the files to the local one drive folder WHILE the app is running. If the files are already in the folder and you start one drive they won't be uploaded. Have you used one drive? I could create an empty folder and set it to sync there and then copy the files into the folder but I would have a race condition where files will start downloading while local files are copying into the folder at the same time and I don't know which will end up in the cloud. – user5389726598465 Apr 30 '17 at 12:20
  • @T No, this is a one time thing. I only want to upload the local folder as it is now into the cloud folder that already exists. Not set up a onedrive sync folder that I will change on a daily basis. – user5389726598465 Apr 30 '17 at 12:39
3

For future users: I solved my problem by mapping the drive using the instructions with pictures found here on laptopmag.com. In Case the site moves etc...

  1. Log into Onedrive.com.
  2. Copy the CID number from the address bar. These are the digits and letters after the "cid=" part of the URL. Don't include any other characters that separate the CID, such as % or &.
  3. In Windows Explorer, go to This PC.
  4. Click on the Computer tab then "Map network drive".
  5. In the Folder field, enter https://d.docs.live.net/ followed by the CID you copied in step 1.
  6. Check the "Connect using different credentials" box.
  7. Click Finish and enter your OneDrive login

Please note: The alternative command line method described on superuser here using net use does not work for my problem as it caused the drive on my computer to map as a one drive folder which is no different that using the app.

For some reason the Gui map as network drive created a mapped drive that I can copy the folder to the existing cloud folder. Robocopy automatically ignores identical files in source and target while changed local files replace the destination cloud files. With /mir option the files on the destination that aren't in the source are removed so for now I can get by with robocopy .\src .\dest /mir.


Update: Using robocopy used to work or has worked before on onedrive mapped as a network drive, however as noted in the comments by some at the link I got permission errors in creating folders and files "ERROR 5 (0x00000005)" when using robocopy. As an aside syncback pro worked great as a temporary solution because it has a full featured 30 day trial and I only needed to do this once but it is a paid app which is not a valid answer to a question. There are always free solutions and alternatives, one that I haven't tried can be found here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.