Regular readers know that the main drive of my new PC is a 80 Gigabyte capacity Intel Solid State Drive. The hard drive is excellent and works well in combination with the 2 TB hard drive that I use for data storage, and some larger programs that do not require a fast hard drive.
I sometimes run into disk space problems. Take the Steam software for instance, it can only install new games on the same hard drive where all the other games are installed (Update: Valve has updated the software in the meantime to allow the installation of games on other drives).
That's a big problem that resulted in a few solutions being posted on the Internet. Some users have moved Steam and all their games to another drive; Others uninstalled a game to make room for the new one. But the problem is not solely a Steam one. There are games that can only be installed on the c: drive for instance, and some applications have the same restriction.
My way of handling space problems on drives is to move the apps or games to another drive without having to reinstall them or lose data. I recently installed Dragon Age which installed itself on the c: drive. I decided to move the game from c:\ to another hard drive with lots of space instead without losing the game's installation status.
The move process itself is easy enough. Just move the files using Windows Explorer, or any other file manager that you may be using, to another hard drive. You can move the folder by pressing shift during the drag and drop operation (if you do not press shift you copy the files).
Most games and applications will not start anymore after they have been moved around.That's because Registry entries may still link to the original location and not the updated one.
The solution to this is to create symbolic hard links. Windows comes with the tool to do just that. Open a command prompt as an administrator. You find the Command Prompt under Accessories in the Windows Start Menu. Right-click the command prompt and select run as administrator.
Update: If you are using Windows 8 or newer, tap on the Windows-key, type cmd.exe, right-click on the result and select "run as administrator".
The command that we are using to create a so called directory junction is mklink. A directory junction basically tells the operating system to create a mirror in another directory that provides access to all files of the selected directory in the mirror directory as if they would be stored in it.
So, in easier terms: all files and folders are accessible in another location, even though they just link to the "real" files and folders on another hard drive.
The files and folders of the mirror directory are however actually only redirected to the destination where they are actually hosted. This essentially means that you can make the game, application or Windows believe that the files and folders are still in their right place even if they are not.
mklink /J "new folder" "folder with the files"
That's the basic command that we will be using. The /J parameter defines the type of symbolic link that we are creating, in this case a directory junction. The new folder is the mirror folder and the "folder with the files" the folder containing the real files that you moved previously.
mklink /J "C:\program files (x86)\Dragon Age\" "e:\games\Dragon Age"
This creates a directory junction so that the files and folders of e:\games\Dragon Age are accessible by the program and Windows under C:\program files (x86)\Dragon Age\ as well (where they have been initially installed to).
C:\Windows\system32>mklink /J "c:\Program Files (x86)\Dragon Age\" "c:\games\Dragon Age\"
Junction created for c:\Program Files (x86)\Dragon Age\ <> c:\games\DragonAge\
The same method can be applied to other applications or games. It is for instance possible to move some Steam games or files to another hard drive to free up space on the one Steam is installed on.
Mklink is available in Windows Vista and Windows 7 (Update: And newer versions of Windows). I'm not sure about Windows XP right now, would be nice if anyone with XP could let me know in the comments. There are programs like Junction from Sysinternals that can create junctions as well in case that is needed.Advertisement
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.