Mounting a drive as a directory

Many people may know Windows has a subst.exe command which allows you to temporarily substitute a folder on your computer for another drive letter.

Windows 7 (may be available on other operating systems too, it’s probably alway been there but I’ve not noticed it before!) has an additional interesting feature that lets you map a complete hard drive to a virtual folder on another drive. Assuming you have two drives in your computer, To enable this, first go to Control Panel > System and Security > Create and format Disk Partitions. This loads up the disk management console:

Disk Management Console

From here, right click on the drive you want to mount as a virtual directory, and select ‘Change Drive letter and paths”:

Right-Click menu

To mount a partition as a virtual directory first the existing drive assignment must be removed. Click on the existing drive letter and select the Remove button. Assuming you’ve read the warning about removing a drive letter assignment and clicked yes to remove, enter the drive letter assignment menu again, and this time select the ‘Add’ button. (Tip: you must create a directory first, click the New Folder button under the Browse for directory dialog to create one.)

Assigning a directory

Click ok and open Windows explorer. It is now possible to see this directory as a linked folder:

This is especially useful to extend the space on an existing machine while not requiring operating system upgrades, re-installs and so on.