1

I want to sync a large folder on my Windows machine to OneDrive without duplicating it on my local drive. I have read two tutorials suggesting using the mklink command to create a link between the folder and the OneDrive sync folder, but they use different options: /D and /J.

The first tutorial recommends using the /J option to create a directory junction, which is a type of symbolic link that can link directories across different volumes. The second tutorial (from the official Microsoft website) recommends using the /D option to create a directory symbolic link, which is another type of symbolic link that can also link directories across different volumes.

I am confused about the difference between these two options and which one I should use for my purpose. I have read some articles that explain the difference between hard links and symbolic links, but I am still unclear about the difference between directory junctions and directory symbolic links and how they affect the OneDrive sync process.

Can anyone explain the difference between the /D and /J options for the mklink command and which one is better for syncing folders to OneDrive? Thank you in advance.

Foad
  • 892
  • 4
  • 19
  • 54

1 Answers1

0

Since you're creating the links in Windows, the difference is explained in the posts listed in the comment by @Mokubai.

As regrading OneDrive, there is a red flag raised by the following sources:

It seems like the OneDrive sync may sometimes have issues with both kinds of links. Microsoft counsels to move these folders physically into the OneDrive folder, and replace them by links to the moved folders.

In general I would conclude that both links may work for OneDrive (I would think for most of the cases), but you should check from time to time that they continue to work correctly, especially after Windows Updates to OneDrive.

harrymc
  • 498,455