Symbolic link - How does it work?

0

Using Windows 7

Overview- I have an SSD and HDD installed in my computer. I would like to have all data files (ie AppData) saved to the HDD, this way I avoid unnecessary read/writes to the SSD.

Goal- Create symbolic link to AppData folder so that the data is stored on the HDD but the AppData location on the SSD is really pointing to the HDD

What I have Tried- I created a symbolic link to my pictures folder on my D:\ drive. so my command was:

> mklink /J D:\Pictures C:\Users\Pictures

Questions-

  1. For my command above, does this mean that the file is physically still located on my C:\ drive, and the D:\ drive is simply pointing to those files? or is it the other way around?

  2. If I create a symbolic link to C:\Users\appData from D:\appData will programs using C:\Users\appData be saved to the D:\ drive or will it still be saved to the C:\ drive?

  3. Will I need to delete the appData folder on my C:\ drive and move it to my D:/ drive before creating a symbolic link?

Adjit

Posted 2015-11-11T17:10:32.827

Reputation: 117

Answers

1

To answer your questions:

  1. mklink uses the convention link target. So when the computer attempts to write to C:\Users\Pictures, it is actually writing to D:\Pictures.
  2. Again, the same thing applies. The computer will write to the link D:\appdata
  3. Yes, you will need to delete the folders first in order to create the link.

Here is an article that walks through something very close to what you want.

However, I do want remind you that it is perfectly safe to leave all this on your SSD. Your SSD will not fail anytime soon, even with lots of writes. Your SSD will last longer than you will want to keep your computer (and most likely the next several computers). So if you have the space on your SSD, there really is no need to move the data.

Keltari

Posted 2015-11-11T17:10:32.827

Reputation: 57 019

Your point 1 seems wrong: with mklink /J D:\Pictures C:\Users\Pictures, when you try to write to D:\Pictures it will actually write in C:\Users\Pictures. I'm not sure about item 2, as the OP seems to be using confusing wording regarding "from" and "to" (if you make a link from C to D, it looks like you are making a copy of the files from D to C). – Fabio says Reinstate Monica – 2018-03-08T10:17:12.443