Moving Stuff Around Between Disks - Hardlinks vs Symlinks vs Junctions

So @BeachAV8R just reminded me here that there is an X-plane demo to try, I had forgot all about that.

The demo download page is here:

Being an ‘early adopter’ (that’s shorthand electronic consumer speak for ‘complete idiot needing to part with money’) I’ve got a couple of SSDs (um, 5 now) in this PC, of varying size. As I keep buying them they keep getting faster and bigger. The oldest ones are actually small and can’t contain many of today’s big games.

So what I want to do (and what this post is really about) is to make some room so I can try X-Plane on my fastest SSD and perhaps move some stuff off I don’t usually play, but not break it.

The easiest thing to do would be just to uninstall stuff I don’t play, but there’s always that ‘Ah, but I might play it’ feeling that stops me. So another option is to move the files but leave a ‘NTFS Link’ back to the folder on another disk. Keeping the gobbledygook to a minimum on Windows we use a ‘NTFS’ filesystem structure, and it’s possible to put ‘shortcuts’ in that to fool where the OS thinks things live.

There are three types of links:

  1. Symbolic Links. A link to a file or directory, which can be on another disk or even another machine using something called a UNC path (\\FROGPC1\C$\ etc).

  2. Junctions. A link to a file or directory on the same or different volume, but on the same machine.

  3. Hard Links. A link to just a file on the same volume (i.e. c:\frog.txt → c:\dir1\frog.txt). Often used where the link needs to abide by 256 character restrictions on filenames in old apps.

They roughly have a performance impact where hardlinks are the fastest, junctions are ok and symbolics can be random (as often on another machine, so network dependent).

So let’s do an example of what I need (it’ll work on any folder/install, but a real example helps).

  • I want to move my ‘DCS Open Beta’ install (the Open Alpha is working great for me, so I rarely use the Beta now, but don’t want to remove it as updates will use that as a delta to update (maybe)) to make some space.

  • I still want the DCS Open Beta to work and for Windows to think it hasn’t moved.

In this case, I want to use a ‘Junction’ as the volumes (D: and E: in my case) are on the same machine but I want an entire ‘folder tree’ directory to move and leave a link back.

I could just use the MKLINK windows command (built in Vista upwards), here’s the options with now the link types explained should make more sense:

I do this often enough though that I use a Windows Explorer Shell Extension for it (plus that ‘link target’ always gets me for the wrong way around). There are a few but this one is here and free:

http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html

Don’t be put off with the webpage design (it’s a programmers occupational hazard), as the following example shows, it’s pretty simple:

  1. First off I ‘Cut’ my D:\Games\DCS Open Beta directory in my regular Windows File Explorer. Then I paste it to it’s new home on E:\Games. Whirr whirr (if SSD’s made noise).

  2. I pick the newly arrived folder on E: and use the shell extension to say it is a ‘link source’. Check out the artwork here showing that:

  1. I then go back to where it used to live (D:\Games) and do the following:

So I’ve dropped the link as a Junction. (Note: If your PC can go faster than 88 mph then don’t use the DeLorean Copy option). You can see it with a wee link icon here, to show it’s a link:

So I now have a fully functional DCS Open Beta install that Windows thinks lives in D:\Games\DCS Open Beta (just like it did before) but really takes space up on volume E:. It’s not a copy, it’s literally a link back.

I’m now free to use that extra 25GB for some X-Plane demo!

1 Like

Good lord I love Linux/Mac for this stuff. It’s so easy there. Windows? I just don’t even try :slight_smile:

2 Likes

For extra fun, the *nix ln and Windows mklink commands are opposite order parameters, which is why I think I use the shell extension (or rather keep getting them the wrong way around so like the menus).

ln -s "to-here" <- "from-here"
mklink "from-here" -> "to-here"

:slight_smile:

Anyway, I hope it helps someone out.

1 Like

Funny. I did exactly the same two days ago. Good guide. It’s really not that hard but makes managing multiple disk drives so much easier.

The MKLINK did the trick. Move all of Cloud Imperium (Star Citizen) to D: Thanks!

1 Like