Nifty Way to Safely Move Folders or Programs to Another Drive or Partition in Windows 7

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:

  1. Before doing anything, make sure you have a backup of your system
  2. 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
  3. Next open a command prompt with elevated privileges. (This previous tip explains how.)
  4. 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.
  5. If a link is successfully made, the command line will show a message “symbolic link created for ExistingName <<===>> X:\NewName”.
  6. 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.

Click here for more items like this. Better still, get Tech Tips delivered via your RSS feeder or alternatively, have the RSS feed sent as email direct to your in-box.

Share this
4.407405
Average: 4.4 (27 votes)
Your rating: None

Comments

by BarMeNam on 6. February 2014 - 11:41  (114285)

Thank YOU for the link to "SymMover ". I received a gift of malware as a door prize. You download the crapware and are forced also to download their free backup system.

[Personal and racist comments deleted as per site rules]

by MidnightCowboy on 6. February 2014 - 12:09  (114286)

The SymMover download defaults to cnet which uses a wrapped installer. It is from this you received the unwanted extra components. We published an article about this some time ago but maybe you missed it. MC Site Manager.

http://www.techsupportalert.com/content/cnet-downloadcom-wrapped-install...

Additional information here.

http://www.techsupportalert.com/content/what-else-have-you-just-download...

Gizmo's Freeware is Recruiting!

Gizmos Needs YouShare your knowledge of free software with millions of Gizmo's readers by joining our editing team.  Details here.