0

This sounds like an easy-enough question, and luckily I found an article on it here, which I followed.

I have mapped my OneDrive as a Network Location on my PC, and it works perfectly (though I had to bump up the file-size transfer limit from 50MB to 1GB in regedit) - I can view all my files and what not.

So here I must note my OneDrive already has half the stuff I wanted to backup (I had previously been backing up manually) and consisted of lots of nested directories, so when it came to using robocopy, I hoped it would scan through all the files, recognise half are already in the destination, so only upload the ones not there (and the ones that modified more recently than the existing ones).

I'm new to robocopy, but had a go using this command as a test (I planned on scheduling this command every week if successful):

robocopy C:\Users\adam\Pictures "[CID no.] (\\d.docs.live.net@SSL\DavWWWRoot)" /MIR /FFT /R:3 /W:10 /Z

where [CID no.] is replaced with the CID of my OneDrive, an 8 byte hex string. So robocopy goes and does its stuff for the next few hours, the output being:

100%        New File              IMG_0001.CR2
...   
100%        New File              IMG_8674.CR2
------------------------------------------------------------------------------

               Total    Copied   Skipped  Mismatch    FAILED    Extras
    Dirs :     10278     10278         0         0         0         0
   Files :     23500     23500         0         0         0         0
   Bytes : 153.419 g 153.419 g         0         0         0         0
   Times :   1:39:26   1:35:40                       0:00:00   0:03:46


   Speed :            28697353 Bytes/sec.
   Speed :            1642.075 MegaBytes/min.
   Ended : 16 June 2018 19:27:37

So I go back to my OneDrive, and there aren't any of the new files there. Nothing has changed in the OneDrive network drive (I double checked in the OneDrive client) from when I began the command, even though I got a non-error output.

So can someone help me out please? Preferably provide a solution using robocopy, but any other free solutions are welcome (I've already looked at working entirely from the OneDrive folder (the folder that is created with the OneDrive program) instead of my Windows libraries, but I decided that would be a last resort). Oh and any 3rd party alternatives must be able to be scheduled someway. Thanks!

0

according to the guide that you referenced the guy maps a network drive and then copies everything to the network drive. Hence you mount the onedrive to the newtork Drive Z:\ you will use

robocopy C:\Users\adam\Pictures Z:\backupfolder /MIR /FFT /R:3 /W:10 /Z

to copy everything to onedrive.

If you prefer not to always have the network drive mounted, then you can create a .bat file and then execute the .bat periodically e.g. with Task Scheduler:

net use Z: https://d.docs.live.net/YOUR_CID/ /persistent:no 
robocopy C:\Users\adam\Pictures Z:\backupfolder /MIR /FFT /R:3 /W:10 /Z
net use Z: /delete

You probably have to use /user: and password to automatically authenticate if you are not executing the .bat in user-space while being logged on.

  • That's what I did though, map a network drive Z: to my OneDrive, then run the command - but it didn't copy any files. – Adam Bromiley Jun 17 '18 at 16:05

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.