Assign Drive Letters to Folders

Martin Brinkmann
Aug 18, 2006
Updated • Oct 25, 2015
Windows, Windows tips

Did you know that it is possible to assign drive letters to folders so that you can access those folders as if they were hard drive partitions?

This makes it not only easier to access those folders on the system, as you do not need to navigate to them first in Windows Explorer, but also makes running programs easier especially from the command line as you do not have to enter the full path to the folder but the abbreviated one instead. In addition, it may speed up load and save operations on Windows systems.

It is very easy to assign a drive letter to a folder, to do that, do the following:

  1. Click Start, select run and enter cmd. You can alternatively bring up the run box with Ctrl-r, typing cmd and hitting enter.
  2. This should open the command line interface of your windows operating system.
  3. The command that we need is the "subst" command and we use it the following way: subst drive folder. Make sure you don't add a trailing slash to the folder as the path may not be found otherwise by the command.
  4. Lets say you want to assign the drive letter X to the folder d:\movies on your hard drive. To do that you write the following command: subst x: d:\movies

That is all. Fairly easy isn't it? Now the drive letter x: remains accessible as long as you do not turn off or reboot windows.

subst virtual drives folders

If you want to make this permanent you will have to do the following:

  1. Create a new file and name it drive.bat. Edit the file and add the line subst x: d:\movies to it and save it.
  2. Right click the Start button, select Open All Users.
  3. Open Programs, Startup and right click that location.
  4. Select New Shortcut, and select the drive.bat file that you created.
  5. Select Next and finish.
  6. The command will be executed for all users during every startup of windows so that the folders can be accessed using the selected drive letter.
  7. If you are running Windows 95 you can edit the autoexec.bat and add the line there.

Update: If you do not like to work with the command line or bat files, you could head over to NTwind to download Visual Subst instead, which is a gui version of the program.

visual subst

To use the program simply select a drive letter in its interface and pick a folder from a hard drive to link the two together.

Assign Drive Letters to Folders
Article Name
Assign Drive Letters to Folders
Find out how to assign drive letters to folders to access them more quickly on any machine running the Windows operating system.

Tutorials & Tips

Previous Post: «
Next Post: «


  1. Adrian said on May 14, 2011 at 8:40 am

    The command works in Window 7 but cannot get the Batch file to run at start up.

  2. Anonymous said on June 15, 2009 at 9:28 am

    very nice :)

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.