Windows 10: Use symbolic links (mklink) to sync OneDrive, does it still work?

Discus and support Use symbolic links (mklink) to sync OneDrive, does it still work? in Windows 10 Network and Sharing to solve the problem; I've been using symbolic links (mklink/d) to sync files in my computer to onedrive and it has been doing good. However, it didn't work a fee weeks ago... Discussion in 'Windows 10 Network and Sharing' started by LakefrontHK, Feb 11, 2019.

  1. Use symbolic links (mklink) to sync OneDrive, does it still work?


    I've been using symbolic links (mklink/d) to sync files in my computer to onedrive and it has been doing good.

    However, it didn't work a fee weeks ago and i've tried all methods, e.g. unlink to this computer and link again, check windows updates etc. But none of them worked. I'd like to know if symbolic links still work for onedrive? Any methods to solve this problem? Many thanks!

    :)
     
    LakefrontHK, Feb 11, 2019
    #1

  2. Mklink - Symbolic Link with NAS & Onedrive

    Ok... I've managed to answer my own question lol... but this might be of help to someone else trying to sync onedrive files that are actually stored on a NAS... because onedrive won't let you relocate its folder to the NAS.

    So your Onedrive folder is located here:

    C:\Onedrive

    and you have a mapped drive from your NAS

    W:\Work

    And inside the "Work" folder you have a "Documents" folder (the folder you want synced to Onedrive)

    W:\Work\Documents

    What you need to do next is run "command" as administrator and goto your onedrive folder (C:\Onedrive)

    Then use the following command..

    mklink /d Documents W:\Work\Documents

    This will then create a symbolic link to your onedrive folder and start to sync Use symbolic links (mklink) to sync OneDrive, does it still work? :)

    Thank you all!
     
    djsupersain, Feb 11, 2019
    #2
  3. MennoLN Win User
    2-Way sync doesn't work in OneDrive when using symbolic links or junctions

    I’ve already read a lot about the problems with Symbolic Links and Windows 10 on internet, but not about the phenomenon I run into now. So here it is…

    My goal is to 2-way sync a folder (‘My Music’), located on a separate data partition of my SSD-drive, to the OneDrive cloud via a symbol link. It all works fine… except the 2-way syncing. It stays a 1-way street somehow. :-(

    Both the data partition and the Windows system partition have the NTFS file system. The data partition has the letter (XUse symbolic links (mklink) to sync OneDrive, does it still work? :). I have an existing OneDrive account with no files or folders on it yet.

    As far as I understand now, creating a junction is the way to go, although creating a symbolic link could work too in this case. The procedure I followed is this:

    1. Opened my OneDrive account online.
    2. Set up OneDrive on my computer.
    3. Keep the standard location of my OneDrive on the system partition: C:\Users\<my user name>\OneDrive.
    4. Opened the command prompt as administrator.
    5. Created the junction with this command: mklink /J “C:\Users\<my user name>\OneDrive\My Music” “X:\My Music”
    6. The ‘My Music’ link appears as a folder underneath the OneDrive icon in Windows Explorer.
    7. Tested if the link with the folder ‘My Music’ on my data-partition actually works. And it does perfectly.
    8. Over to OneDrive online. The ‘My Music’ folder also appeared in my OneDrive online.
    9. Uploaded a random file from my computer into the ‘My Music’ folder to test the syncing.
    10. Uploaded file appears in my OneDrive online.
    11. Back to Windows Explorer on my computer. The uploaded file has appeared in the ‘My Music’ folder on the data partition via the created link.

    So far so good. Anything I upload to my OneDrive online appears perfectly in my data partition folder. But the problem is that the 2-way sync fails. If I change anything in the ‘My Music’ folder on the data partition, that change does appear in the same OneDrive folder that is linked (obviously), but that’s where it stops: no syncing to OneDrive online. How come and what is the solution?

    Exactly the same happens if I use not a junction, but a symbolic link: mklink /D “C:\Users\<my user name>\OneDrive\My Music” “X:\My Music”

    And my 2nd question is: how is it possible that the result is exactly the other way around, when I change the procedure and first create the junction (or symbolic link) and then set up OneDrive on my computer? So in that case syncing a file to OneDrive online via the created link works fine, but if I change anything in the ‘My Music’ folder in OneDrive online, that change does not appear in the folder on my data partition. Again, it’s only 1 way.

    I just don’t get it. Does anyone have the answers please? Thanks in advance!
     
    MennoLN, Feb 11, 2019
    #3
  4. na51hog Win User

    Use symbolic links (mklink) to sync OneDrive, does it still work?

    Mklink - Symbolic Link with NAS & Onedrive

    This does work, and I used it to point OneDrive to my Synology NAS. However, there is a caveat.

    If (when) your OneDrive account becomes disconnected and you reconnect, it will look to the directory with your symbolic links in it and decide if the local drive the links are located on has sufficient space for the files in your NAS location. If not, it will present you with a message about negative disk space - see image Negative Disk Space and won't allow you to 'Next' .

    Use symbolic links (mklink) to sync OneDrive, does it still work? 6nVWI.jpg


    You can, of course, deselect files and folders to sync, and continue. You will be able to access the files through the OneDrive folder, but new or changed files won't sync, which does rather defeat the purpose of OneDrive!

    For you to recover from a disconnect, your locally declared OneDrive location must be larger than the file space occupied by your files in your actual NAS location.

    I overcame this problem by moving my local OneDrive location to a drive that had more empty space than the files occupying my NAS. To do this I created a OneDrive directory on a 2 terabyte internal drive and recreated the Symbolic Links from my original OneDrive location in it (I didn’t want to risk a copy or move of the existing symbolic links in case something untoward happened as a result). Then I unlinked OneDrive from the PC via the Settings in the OneDrive app.

    Restarting the app prompted me to log in and then accept or alter the default location for OneDrive. I selected the OneDrive directory I had created on the 2 terabyte drive and away it went. OneDrive did the math on the local drive disk space vs the space taken on the NAS via the symbolic links, concluded there was now sufficient for synchronisation and signed me in.

    After a short while, OneDrive confirms the local data (on the NAS) is synced with the cloud and we are good to go.

    Hope my experience is helpful to others.
     
    na51hog, Feb 11, 2019
    #4
Thema:

Use symbolic links (mklink) to sync OneDrive, does it still work?

Loading...
  1. Use symbolic links (mklink) to sync OneDrive, does it still work? - Similar Threads - symbolic links mklink

  2. Are symbolic links available to sync PC to Onedrive?

    in Windows 10 Customization
    Are symbolic links available to sync PC to Onedrive?: I used to use symbolic links to sync files on my PC to OneDrive. But these symbolic links stopped working a while ago. So I do a query, are they available?...
  3. 1809 still does not work

    in Windows 10 Updates and Activation
    1809 still does not work: After Window10 upgrade to version 1809 I can sign in only with temporary profile. Windows recognize digital license. 2018-11 Cumulative upgrade did not help. I found a lot of files moved to C:\Users and they stay there. My outlook email does not work...
  4. Word does not want to save to a symbolic link directory

    in Windows 10 Network and Sharing
    Word does not want to save to a symbolic link directory: Hi there, I have opened a file from a symbolic link folder (File is located on another computer in a folder that has been linked as a symbolic link on my computer) When I try to do Save As under a different name on the same folder I get "A file error has occurred" error. If...
  5. Windows Accessories - Using Xcopy breaks folder symbolic link

    in Windows 10 Support
    Windows Accessories - Using Xcopy breaks folder symbolic link: Hi Guys I'm using XCOPY to move some icons into the 'Windows Accessories' folder. The 'Windows Accessories' folder true file location is: C:\Users\UserXYZ\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories AND C:\ProgramData\Microsoft\Windows\Start...
  6. Calendar link does not work

    in Windows 10 Software and Apps
    Calendar link does not work: OK, so I now created a calendar. Now I want to share the calendar by putting a link to the calendar on my website. So I click share, select the desired calendar, select "links to event details" and there are three links. I copy the one that says "view in a web browser" into a...
  7. OneDrive Syncing!

    in Windows 10 Network and Sharing
    OneDrive Syncing!: Hi everyone, I have accidentally permanently deleted my one drive folder on my laptop, thankfully my one drive syncing client was closed. How do I securely get my files back on my laptop, without messing up my one drive cloud. Please reply ASAP! P.S. I have around 3 GB...
  8. Symbolic Links (Soft Links)

    in Windows 10 Support
    Symbolic Links (Soft Links): Greetings, I have a large number of symbolic links (soft links) on my PC that I want to migrate to a new machine with an identical directory structure. When I use various backup or copy programs that clone files (bit copy), the symbolic links do not work on the target...
  9. OneDrive Sync

    in Windows 10 Support
    OneDrive Sync: Hello Good People, Despite looking around, I don't understand how the sync works. First, is there a master, so to speak. ie does the cloud version mimic the PC files. ie if there is a file on my PC and not on the cloud, will the cloud get updated? An then, if a file gets...
  10. Symbolic link (Junction/s), how-to mklink? Please help with Junction?

    in Windows 10 Support
    Symbolic link (Junction/s), how-to mklink? Please help with Junction?: Hi all, having been a member at Seven then Ten forums for a fair while I'm hoping to find a straight answer here..? Apologies in advance if this is too verbose. Windows 10 system booting from (UEFI) NVME with 2xSSDs + 2 MHDDs for storage... An application (Xperia...