Symbolic Link Automation in Windows

If you’re using a small-capacity SSD and have your main OS partition (in this case Windows 7) on it, it is possible that you run out of space in no time. In my case I’m using a relatively old 60 GB SSD (they were really expensive when I get this one) and have very little available space on this volume. Mainly used OS files (the OS partition is here) and executables reside here, so having an SSD really boosts system performance a lot! Main problem in my case is that many installed programs and Windows itself stores data files that are not frequently used (so that will not affect performance) here, and there is a need for generating symbolic links, which can be done via the command prompt. I generally forget the mklink syntax and need to google it everytime I want to do it or become too lazy to copy directory contents to another location/delete files and come up with an automation mainly written on autoHotkey (a scripting tool for Windows). This script simply gets a command line parameter (the folder to be symlinked), copy its contents to the selected destination, deletes old files and generate the symlink for me. The final step is registering it as a context menu item on Windows. I’ve also  scripted a basic installer for this whole process, which copies the exe into system32 folder and registers the context menu item.


You can download the source code, installer and the executable here: SymLink.zip If you trust me (think twice), simply double-click installer.bat and you have instant SymLink magic! You can access the files at github.

© Ali Naci Erdem 2024