Would you like to move some folders or programs off the C:\ drive to free up space or to reduce wear and tear on an expensive SSD? Unfortunately, moving folders or files off the C:\ drive to another drive or partition is not always as simple as it seems. The folder or file may be referenced in the Registry or in some script or application. If it is an installed program you are moving, you would have to uninstall it and then re-install it in the new location. Making an ordinary shortcut file won’t do because shortcuts look like separate files to programs and the Registry.
A previous tip showed a method for safely moving certain personal folders. In this tip I will show a general but simple way to move programs or other folders and files while maintaining all the original references. In fact, you can make it appear that your folder or file is still on the C:\ drive when it has actually been moved to another drive or partition. Moreover, you will be able to access or even edit the object from either place although there is only one copy. It brings to mind the old expression about having your cake and eating it too. The method uses what are called symbolic links. (A simple explanation of what symbolic links are can be found in this article.)
Symbolic links can be created in the command line with a special command that was first introduced in Vista. It is called Mklink (described in more detail here) and here is how it works for a folder:
- Before doing anything, make sure you have a backup of your system
- Move (not copy) the desired folder (let’s call it ExistingName) by the usual methods to its new destination on the X:\ volume. Give it whatever name you choose. Let’s call it NewName but it can retain ExistingName if you wish. At this point programs and Registry references may be broken. It is necessary to move the folder first since otherwise no symbolic link can be created on the C.\ drive
- Next open a command prompt with elevated privileges. (This previous tip explains how.)
- Enter the command mklink /d C:\ExistingName X:\NewName The switch /d indicates that we are linking folders (directories). No switch would be used if a file was being linked. If your folder name has spaces, you have to enclose the path name in quotes.
- If a link is successfully made, the command line will show a message “symbolic link created for ExistingName <<===>> X:\NewName”.
- Close the command prompt
That's all it takes. All of the previous Registry or other references to C:\ExistingName will continue to work. The command creates a small object on the C:\ drive that retains the previous folder name and behaves as if it has the contents of the folder that is really over on the X:\ drive.
It’s the magic of symbolic links.
Freeware that uses symbolic links to move folders - I haven't used it because I prefer the quick and easy command-line method but there is a free application called SymMover for moving folders and creating symbolic links. Website is here. If you try it, let us know how it worked out.
Warning: Moving personal data folders by the method described here is fine but moving or redirecting the main Users folder can cause trouble with upgrades.
Get your own favorite tip published! Know a neat tech tip or trick? Then why not have it published here and receive full credit? Click here to tell us your tip.
This tips section is maintained by Vic Laurie. Vic runs several websites with Windows how-to's, guides, and tutorials, including a site for learning about Windows and the Internet and another with Windows 7 tips.