Sync Any Folder to OneDrive in Windows 10  

Page 18 of 18 FirstFirst ... 8161718

  1. Posts : 8
    Windows 10 Home
       #170

    Thank you for your post, Cerberus. I'm afraid I missed it earlier. Sorry.

    I had already read that tutorial, which says that "Anything you ... delete in either of these two folders will also be applied to the other folder". However, I then saw posts in this thread saying that deletions in the local folder are not also applied in OneDrive, and this has been confirmed by Brink. So, I'm confused.

    Also, I've seen recommendations on the web that I should use the /d flag rather than /j. I'm afraid I haven't found any explanation of the differences between links and junctions that I understand. What would be the practical implications of using /d rather than /j for mirroring a local folder in OneDrive?

    My starting point is that I have a local folder (a subfolder of c:\) which I want backed up in OneDrive so that OneDrive maintains in the cloud an exact copy of the local folder. Up to now I have resisted moving the local folder into the OneDrive folder (C:\Users\.....\OneDrive) on my PC merely on the grounds that the path to that folder is longer. However, perhaps in reality moving the folder would be simpler than using a link or junction.
      My Computer


  2. Posts : 29
    Windows 10
       #171

    How to Sync Any Folder to OneDrive in Windows 10
    [...]
    This tutorial will show you how to sync any folder to OneDrive that is not already in OneDrive for your account in Windows 10.
    [...]
    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"
    [...]
    For example:
    mklink /j "%UserProfile%\OneDrive\Example Folder" "F:\Example Folder"
    3 The source folder (ex: "F:\Example Folder") will now be synced with your OneDrive. Anything you copy, save, and delete in either of these two folders will also be applied to the other folder.
    This no longer works, does it? Microsoft also says so. Well it seems to work for a folder with some files contained in it. But as soon as the folder contains entire folder structures, it doesn't work anymore. It can also be read in many places on the net that the Junction method used to work, but has stopped working for quite some time.

    The only method that reportedly works is to move the original data into the OneDrive folder, and to create a junction to wherever other place you want to see the data.

    Or does anyone have a different status on this.
    Last edited by David P; 09 Apr 2022 at 16:34.
      My Computer


  3. Posts : 14,587
    Windows10
       #172

    David P said:
    This no longer works, does it? Microsoft also says so. Well it seems to work for a folder with some files contained in it. But as soon as the folder contains entire folder structures, it doesn't work anymore. It can also be read in many places on the net that the Junction method used to work, but has stopped working for quite some time.

    The only method that reportedly works is to move the original data into the OneDrive folder, and to create a junction to wherever other place you want to see the data.

    Or does anyone have a different status on this.
    To say it no longer works is an exaggeration. There may be limitations, but that is not directly to this method.

    I have just backed up an entire music folder on my e drive with primary directory and subdirectories with no issue.
    Maybe it cannot handle too many levels but I bet that is more due to pathname length.



    Symlinking FROM onedrive rather defeats point of this tutorial. Main use is when a user has limited data capacity on C drive and wants to store data on a secondary drive but still get it backed up to onedrive automatically.

    If you have a file structure, it should still work if you create a symlink for each folder in file structure.

    Obviously not going to work if too many nested as paths could get too long. That limitation applies with any symlink.

    Edit: just read that MS link - it refers to soft symlimks wirh /d.
    The tutorial uses /j hard directory junction links and they do not have all the same limitations e.g. they can be on different drives.
    Last edited by cereberus; 10 Apr 2022 at 01:08.
      My Computer


  4. Posts : 29
    Windows 10
       #173

    Yeah I just found that with "smaller" folder structures, it works fine with both symlinks and junctions.

    But if I junction- or symlink a multi-dozen gigabyte folder structure with some 100,000 folders and files, it doesn't work. Instead, OneDrive seems to remain in the "Searching for changes" state forever.

    You think that is due to paths that are too long? I do have lots of paths (much) longer than 255 chars.

    Edit: Path length can't be it: I just synchronized a folder with many paths even longer than 350 characters successfully as a junction to OneDrive.
    Last edited by David P; 10 Apr 2022 at 03:20.
      My Computer


  5. Posts : 234
    Win 10 1809 LTSC
       #174

    cafeine said:
    Hi Everyone,

    Seems like you are having the same issues I had a few years back.

    Don't know if you have checked my solution to this issue yet, but I believe would worth your time, it is open source and free here:

    GitHub - ktheod/OneDriveBully: Bully your OneDrive to sync Symbolic Link Folders

    Essentially it is an app that provides you a nice GUI based symbolic link creation and periodically "bully"/trick OneDrive to scan and sync changes in all symlinked folders by renaming an empty file in the root folder of OneDrive.

    Thanks,
    cafeine
    Thanks, and also to this thread in general.

    So I discovered something alarming in the onedrive app.

    Normally if I do backups, I expect it to be non destructive to the source files, but some may not know how onedrive does its magic.
    So basically as an example my pictures were installed in F:\users\Chris\pictures instead of default location. My one drive in B:\Onedrive.

    When I enabled backups/sync for my pictures instead of just uploading from the original location it moved the pictures to B:\Onedrive\Pictures and then uploaded, so was destructive to the original location. At no point does OneDrive inform its moving the original files locally, or at least I dont remember it saying so.

    Now even worse is when I did the documents folder, the same thing happened, but this time it couldnt lock 3 files as they were in use, I clicked skipped assuming it would merely skip the upload, but what actually happened is it deleted the source folder after it finished moving to the B drive and those 3 files were lost (well would have been if I had no other backups/shadow copies).

    Macrium Reflect was completely broken by it, as it stores its XML files in the documents folder, and for whatever reason doesnt track the document location updates so was looking for in the original path. Macrium breaking is what alerted me to the local destruction.

    I stopped the onedrive backup service for pictures,desktop,documents, then moved them back to their original locations, now synced them via junctions instead which is what the default app should be doing in my opinion as thats non destructive. I made the junctions manually, but have installed the app anyway as I think its needed for the auto sync to work on junctions.
      My Computer


 

  Related Discussions
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 10:44.
Find Us




Windows 10 Forums