Pointing folder to different disk

Say I have a D-drive and a folder SomeData. For performance reasons I would like the data in SomeData to be on a different harddisk (SSD), while keeping the paths intact.

So the file D:\SomeData\ImportantFile.txt would still be in that path, even though actually on a different disk.

Can I "mount" (?) a harddisk as a folder below another disk?

I use Win7 Ultimate and NTFS.


Yes, you can mount disks as folders using the Change drive letter and paths function in diskmgmt.msc, or the mountvol command-line tool. (But see below...)

However, even on the new disk, it is usually better to keep the files contained within a directory – to prevent it from becoming one big mess if you ever decide to use the second disk for anything else. This can be done using junctions or symbolic links – both will work fine; symlinks are recommended but they're supported only on Windows Vista and newer versions, while junctions also work on Windows 2000/XP.

To symlink your SomeData to a different disk:

  1. Move the original directory to the new SSD drive. You must delete the original directory.
  2. Open an elevated command prompt.
  3. Use the mklink utility to create a symbolic link with the same name and location as the original directory:

    C:\>mklink /d D:\SomeData Z:\SomeData
    

    (where Z:\ is your SSD and D:\ is the old drive)

On older Windows versions mklink is not present, but the junction utility from Sysinternals can be used to create junctions.