Sync Any Folder to OneDrive in Windows 10  

Page 1 of 9 123 ... 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
    13 May 2020
    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"

    Sync Any Folder to OneDrive in Windows 10-mklink_onedrive_command.png

    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)
    Sync Any Folder to OneDrive in Windows 10-source_folder.jpg

    (OneDrive locations)
    Sync Any Folder to OneDrive in Windows 10-onedrive_folder.jpg Sync Any Folder to OneDrive in Windows 10-junction_point_in_onedrive_folder.jpg
    Sync Any Folder to OneDrive in Windows 10-online_onedrive.jpg


    That's it,
    Shawn


    Related Tutorials



  1. Hemimax's Avatar
    Posts : 1,745
    Windows 10 Pro X64
       #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 Computers

  2. Brink's Avatar
    Posts : 48,805
    64-bit Windows 10 Pro for Workstations build 19635
    Thread Starter
       #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 Computers

  3. Hemimax's Avatar
    Posts : 1,745
    Windows 10 Pro X64
       #3

    Thanks @Brink and @cereberus, your the best!
      My Computers


  4. Posts : 6
    win 10 April update
       #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 Computer

  5. Brink's Avatar
    Posts : 48,805
    64-bit Windows 10 Pro for Workstations build 19635
    Thread Starter
       #5

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


  6. Posts : 6
    win 10 April update
       #6

    thakyo said:
    @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 Computer



  7. Posts : 26
    Windows 10
       #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)
    Sync Any Folder to OneDrive in Windows 10-mklink.jpg
      My Computer

  8. Brink's Avatar
    Posts : 48,805
    64-bit Windows 10 Pro for Workstations build 19635
    Thread Starter
       #8

    Hello Scoth,

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


  9. Posts : 26
    Windows 10
       #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 Computer


 

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
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 16:48.
Find Us




Windows 10 Forums