mklink – symbolic links for windows

I found this feature the other day and it’s made my life easier. When compiling GMod the source is in a folder called src, and the generated binaries go in a folder next to src called game. To test it out I had a script that copied the binaries from game to sourcemods. That way I can run the development version of Garry’s Mod as a Mod on Steam.

Well with mklink I can create a link between game and sourcemods. So that when I open the sourcemods folder it’s identical to the game folder. It’s the same folder under a different name. The OS treats it exactly as if the files were in sourcemods.

The command line is pretty straight forward..

mklink /D /J [TARGET FOLDER] [SOURCE FOLDER]

For example I have a .bat file in my source 

with the contents:

rmdir D:gamessteamsteamappssourcemods
mklink /D /J D:gamessteamsteamappssourcemods game 

I have that file in both my garry’s mod branch and my garry’s mod beta branch – so I can easily switch between them.

Thought this was a cool feature that someone might want to know about.