Windows – Pause OneDrive sync using cmd

cmd.execommand lineonedrivesyncwindows

I would like to know how to pause onedrive from syncing using a command in the cmd. I am doing this because I have my .minecraft folder shared in onedrive and when I am playing minecraft, it is really slow and onedrive tries to sync the data that is being used. Right now I have to pause it with right clicking the folder and clicking pause but I would like to know the code to stop it with cmd so I can made a .bat file to pause onedrive and then start minecraft. If anyone knows how to do this, please let me know.

Thanks,
Kyle5953c

Best Answer

You can stop it by running a batch file that will loop so it will stop onedrive until you exit:

:Loop
Taskkill /f /im onedrive.exe
Goto loop

If you want to do it manually, then simply just do Taskkill /f /im onedrive.exe

Please run this batch file once you have started minecraft. Tested on Windows 7

Related Question