Sync Any Folder to OneDrive in Windows 10  

Page 1 of 2 12 LastLast
    Sync Any Folder to OneDrive in Windows 10

    Sync Any Folder to OneDrive in Windows 10

    How to Sync Any Folder to OneDrive in Windows 10
    Published by Category: Apps & Features
    15 Aug 2018
    Designer Media Ltd


    How to Sync Any Folder to OneDrive in Windows 10


    OneDrive is free online storage that comes included with Windows 10 and used with your Microsoft account. Save your files to OneDrive, and you'll be able to get to them from any PC, tablet, or phone.

    By default, you can choose which folders to sync in OneDrive with your PC. Windows 10 stores your OneDrive folder in your account's %UserProfile% folder (ex: "C:\Users\Brink") by default.

    This tutorial will show you how to sync any folder to OneDrive that is not already in OneDrive for your account in Windows 10.

    Thank you to our member cereberus for providing this idea.



    Here's How:

    1. Open a command prompt.

    2. Type the command below into the command prompt, and press Enter. (see screenshot below)

    mklink /j "%UserProfile%\OneDrive\Folder Name" "Full path of source folder"

    Substitute Full path of source folder in the command above with the actual full path of the folder (ex: "F:\Example Folder") you want to sync with your OneDrive.

    Substitute Folder Name in the command above with the folder name (ex: "Example Folder") you want to show in OneDrive. This folder is a junction point of the source folder. It would be best to use the same name as the source folder to help know what it's linked to.

    For example: mklink /j "%UserProfile%\OneDrive\Example Folder" "F:\Example Folder"

    Name:  mklink_OneDrive_command.png
Views: 12774
Size:  11.1 KB

    3. The source folder (ex: "F:\Example Folder") will now be synced with your OneDrive (ex: "%UserProfile%\OneDrive\Example Folder"). Anything you copy, save, and delete in either of these two folders will also be applied to the other folder. (see screenshots below)

    If you want to undo this junction point and stop syncing the source folder with your OneDrive, you would only delete the folder (ex: "%UserProfile%\OneDrive\Example Folder") in your OneDrive folder. This will not delete the source folder (ex: "F:\Example Folder"), but will also delete it from your online OneDrive.

    (Source folder location)
    Name:  Source_folder.jpg
Views: 12878
Size:  42.9 KB

    (OneDrive locations)
    Name:  OneDrive_folder.jpg
Views: 12878
Size:  51.6 KB Name:  Junction_point_in_OneDrive_folder.jpg
Views: 12831
Size:  46.0 KB
    Name:  Online_OneDrive.jpg
Views: 12802
Size:  56.9 KB


    That's it,
    Shawn


    Related Tutorials



  1.    03 Jun 2018 #1

    Thank you for this Shawn!
    Just wanted to confirm, any folder on a local physical drive that I mklink with this will be automatically synced to OneDrive folder online and I will no longer have to drag and drop to the local OneDrive folder to initiate the sync. Also I noticed there is a lag time for a new file/folder to show up online that I fixed by restarting OneDrive.
    Last edited by Hemimax; 03 Jun 2018 at 08:14.
      My ComputersSystem Spec

  2. Brink's Avatar
    Posts : 33,785
    64-bit Windows 10 Pro build 18282
    Thread Starter
       03 Jun 2018 #2

    Hello Richard,

    That is correct. You'll be able to use mlink to sync any folder with OneDrive.

    It basically creates a junction point of the folder you want to link in the OneDrive folder, and this allows it to be synced.
      My ComputersSystem Spec

  3.    03 Jun 2018 #3

    Thanks @Brink and @cereberus, your the best!
      My ComputersSystem Spec


  4. Posts : 7
    win 10 April update
       03 Jun 2018 #4

    @Brink, thanks for this tutorial, I've created the link with the mklink command but I'm seeing a strange behavior,

    If I copy something new on the local folder linked with onedrive, it reflects on onedrive but if I delete something from the same local folder, it doesn't get deleted from onedrive online.

    But it works the other way, If I delete anyfile from onedrive online (from the same folder connected locally) then the file gets deleted locally also.

    Thanks again.
      My ComputerSystem Spec

  5. Brink's Avatar
    Posts : 33,785
    64-bit Windows 10 Pro build 18282
    Thread Starter
       03 Jun 2018 #5

    Yeah, it would be best to work out of the OneDrive folder.
      My ComputersSystem Spec


  6. Posts : 7
    win 10 April update
       03 Jun 2018 #6

    thakyo said: View Post
    @Brink, thanks for this tutorial, I've created the link with the mklink command but I'm seeing a strange behavior,

    If I copy something new on the local folder linked with onedrive, it reflects on onedrive but if I delete something from the same local folder, it doesn't get deleted from onedrive online.

    But it works the other way, If I delete anyfile from onedrive online (from the same folder connected locally) then the file gets deleted locally also.

    Thanks again.
    I'm using currently File Sync Backup Software | GoodSync along with mklink to sync my folders because of the above mentioned behaviour of mklink. (I'm no where affiliated with goodsync)
      My ComputerSystem Spec

  7.    10 Jul 2018 #7

    What am I doing wrong?

    (after successful test with "c:\games" I deleted it so there wont be dublicates to mess things up and went for the real deal)
    Click image for larger version. 

Name:	mklink.JPG 
Views:	73 
Size:	68.3 KB 
ID:	195311
      My ComputerSystem Spec

  8. Brink's Avatar
    Posts : 33,785
    64-bit Windows 10 Pro build 18282
    Thread Starter
       10 Jul 2018 #8

    Hello Scoth,

    You need to have your paths wrapped in quotes when there's a space in the path.
      My ComputersSystem Spec

  9.    10 Jul 2018 #9

    This worked. Thanks for the correction
    C:\WINDOWS\system32>mklink /d C:\Users\Brain\OneDrive\Siirto\RtR "C:\Program Files (x86)\Steam\steamapps\common\Rise to Ruins\profiles"
      My ComputerSystem Spec


 
Page 1 of 2 12 LastLast

Tutorial Categories

Sync Any Folder to OneDrive in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


Related Threads
How to Sync Multiple OneDrive Accounts in Windows Quite a few of us Windows users have multiple Microsoft email accounts, each of them today with OneDrive. I am for sure not the only user who subscribes Office 365 Home to get 5 Office licenses...
Apps & Features Reset OneDrive Sync in Windows 10 in Tutorials
How to Reset OneDrive Sync in Windows 10 OneDrive is a cloud-based storage service that comes with your Microsoft account. OneDrive is integrated into Windows 10 where you can view, browse, upload, and share the files you saved online to OneDrive...
Hi! I upgraded my samsung laptop to w10 & recently bought a linx w10 tablet. I also have an Android 5.1 smartphone. I set up onedrive on all 3. The tablet & smartphone function properly. They see the docs i loaded from the laptop, tablet &...
Source: Allow folders to be shared/co-owned with access/sync the same for all co-owners - Feature Suggestions for Microsoft OneDrive
Read more: Microsoft pledges to improve OneDrive sync features for Windows 10 | Windows Central

Tags for this Thread

Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 12:00.
Find Us