Apps Sync Any Folder to OneDrive in Windows 11 and Windows 10


  • Staff
OneDrive_banner.png

This tutorial will show you how to sync any folder to OneDrive for your account in Windows 10 and Windows 11.

You can use OneDrive to sync files and folders between your computer and the cloud, so you can get to your files from anywhere - your computer, your mobile device, and even through the OneDrive website at OneDrive.com. If you add, change, or delete a file or folder in your OneDrive folder, the file or folder is added, changed, or deleted on the OneDrive website and vice versa. You can work with your synced files directly in File Explorer and access your files even when you’re offline. Whenever you’re online, any changes that you or others make will sync automatically.

By default, you can choose folders in your OneDrive folder on your PC to sync with your online OneDrive (cloud).

You can also choose to back up your account's Desktop, Documents, Music, Pictures, and Videos folders to your OneDrive folder on your PC to sync with your online OneDrive (cloud).

However, what do you do if the folder you want to backup and sync to OneDrive is not listed above since there's not an option to select it?

As a workaround, you can create a junction point to link any folder at any location into your OneDrive folder on your PC that will sync with your online OneDrive (cloud).
  • Deleting a file from either the source folder location (ex: "E:\Example Folder") or junction point folder in OneDrive (ex: "C:\Users\Brink\OneDrive\Example Folder") will delete the file from both locations.
  • Deleting the junction point folder in OneDrive (ex: "C:\Users\Brink\OneDrive\Example Folder") will not delete any files in the source folder location (ex: "E:\Example Folder") or the source folder, but will remove the junction point to stop syncing the source folder with OneDrive.


Here's How:

1 Open a command prompt.

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

mklink /j "%UserProfile%\OneDrive\Junction point 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: "E:\Example Folder") you want to sync with your OneDrive.

Substitute Junction point folder name in the command above with the folder name (ex: "Example Folder") you want to show in your OneDrive folder (ex: "C:\Users\Brink\OneDrive"). This folder is a junction point linked to the source folder. It is recommended to use the same name as the source folder to help know what it's linked to, but you can name this junction point folder any name you want. This must be a new folder name that isn't already in your OneDrive folder. This junction point folder will get created in your OneDrive folder with the name you specify here.

For example:

mklink /j "%UserProfile%\OneDrive\Example Folder" "E:\Example Folder"


3 You can now close the command prompt if you like.

Sync_any_folder_to_OneDrive.png


Source_folder_location.png
OneDrive_folder_location.png



That's it,
Shawn Brink


 

Attachments

  • OneDrive.png
    OneDrive.png
    5 KB · Views: 63
Last edited:
it working... but... is that will work as link... or it will "copies" the files to onedrive too?
i mean if default onedrive at c:\onedrive and mklink ar c:\onedrive\test to d:\test
then it will eat space at Drive C (offline files mode) + onedrive space or just drive D + onedrive ?
 

My Computer

System One

  • OS
    Windows 11 Pro 23h2 22631.2792
    Computer type
    Laptop
    Manufacturer/Model
    Toshiba Ultrabook Portege Z830 PT224L-01402S
    CPU
    Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz
    Motherboard
    Portable PC (0x000003EC - 0x103CB030)
    Memory
    6,00 GB (5,90 GB usable)
    Graphics Card(s)
    Intel(R) HD Graphics 3000
    Sound Card
    USB Generic
    Monitor(s) Displays
    Built-in Laptop
    Screen Resolution
    1366x768
    Hard Drives
    Toshiba THNSNB128GMCJ 128GB PCI-E M-SATA INTERNAL Solid State Drive(SSD)
    Keyboard
    Using USB Port K120
    Mouse
    Using USB Port
    Internet Speed
    Broadband 50 Mb/s
    Browser
    Edge Stable Only
    Antivirus
    Microsoft Defender Only
    Other Info
    Screenshot Apps: Snipping Tools || I Try to use Everything from Microsoft Product
it working... but... is that will work as link... or it will "copies" the files to onedrive too?
i mean if default onedrive at c:\onedrive and mklink ar c:\onedrive\test to d:\test
then it will eat space at Drive C (offline files mode) + onedrive space or just drive D + onedrive ?

Hello, :alien:

The files will still actually be saved in the source folder. They are just also linked to and accessible in the junction point folder.

It will use the same amount of space for the junction point folder as the source folder since they are linked. While linked, the files can be deleted from either location, and be deleted in both locations.

They basically act as the same folder in two locations at the same time. The only difference is that you can delete the junction point folder to break the link without deleting the files other than when actually deleting a file in either location pointed out above.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1 14-eu0098nr (2024)
    CPU
    Intel Core Ultra 7 155H 4.8 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Graphics card(s)
    Integrated Intel Arc
    Sound Card
    Poly Studio
    Monitor(s) Displays
    14" 2.8K OLED multitouch
    Screen Resolution
    2880 x 1800
    Hard Drives
    2 TB PCIe NVMe M.2 SSD
    Internet Speed
    Intel Wi-Fi 7 BE200 (2x2) and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender and Malwarebytes Premium
i see,,, so my drive C will not increased.. only my onedrive size
this is a great tutorial

thankyou Brink to bring this trick to onedrive
 

My Computer

System One

  • OS
    Windows 11 Pro 23h2 22631.2792
    Computer type
    Laptop
    Manufacturer/Model
    Toshiba Ultrabook Portege Z830 PT224L-01402S
    CPU
    Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz
    Motherboard
    Portable PC (0x000003EC - 0x103CB030)
    Memory
    6,00 GB (5,90 GB usable)
    Graphics Card(s)
    Intel(R) HD Graphics 3000
    Sound Card
    USB Generic
    Monitor(s) Displays
    Built-in Laptop
    Screen Resolution
    1366x768
    Hard Drives
    Toshiba THNSNB128GMCJ 128GB PCI-E M-SATA INTERNAL Solid State Drive(SSD)
    Keyboard
    Using USB Port K120
    Mouse
    Using USB Port
    Internet Speed
    Broadband 50 Mb/s
    Browser
    Edge Stable Only
    Antivirus
    Microsoft Defender Only
    Other Info
    Screenshot Apps: Snipping Tools || I Try to use Everything from Microsoft Product
:shawn:
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1 14-eu0098nr (2024)
    CPU
    Intel Core Ultra 7 155H 4.8 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Graphics card(s)
    Integrated Intel Arc
    Sound Card
    Poly Studio
    Monitor(s) Displays
    14" 2.8K OLED multitouch
    Screen Resolution
    2880 x 1800
    Hard Drives
    2 TB PCIe NVMe M.2 SSD
    Internet Speed
    Intel Wi-Fi 7 BE200 (2x2) and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender and Malwarebytes Premium
Back
Top Bottom