Assign Drive Letters to your Frequently Used Folders in Windows

If there are specific folders on your hard-drive that you access frequently, here’s a simple tip that will help you quickly reach these folders inside Windows Explorer without having to type the full folder path.

virtual folder drives 

There’s an old DOS command called subst that you may use to assign easy-to-remember drive letters to any local folder in Windows.

Let’s assume that you have iTunes on your computer and it downloads all music, podcasts, movies, etc. in the following folder – C:\Users\labnol\Music\iTunes. Open the command prompt window and type the following command to associate drive "Y" with that folder.

subst y: C:\Users\labnol\Music\iTunes

Now the next time you open Windows Explorer, you’ll see a new drive labeled Y: under My Computer that will directly open your iTunes folder.

You can repeat this process and assign different drives to all your other frequently used directories (the subst command cannot be used with mapped network folders though).

Screencast: How to use SUBST

SUBST Command Demo

The downside is that these virtual drives are temporary and will be removed as soon as you shutdown or restart the computer.

In that case, you may either put all the subst commands in your autoexec.bat file or download the free psubst utility – its just like the subst command but creates permanent virtual drives that will live even after a reboot. If you find the command prompt a little geeky, check the Visual Subst tool that not only adds a nice GUI to subst but also create persistent drives.

Related: More Useful DOS Commands

Find this article at: http://labnol.org/?p=11434

Reader Comments

Another option is to add a shortcut to the favorites pane in Explorer on Vista and 7. Simply drag the folder you wish to access easily to the left-hand pane, and it will automatically create a shortcut there that you can easily access.

don’t.

subst is a 16 bit driver, which slows down your system.
use one of the freeware alternatives.

I think this goes off when you logoff.

There are another couple of downsides to using subst (I’ve used this “trick” for many years) in Vista and above:

1. If you delete a file from a subst’d drive, the file does NOT go into the recycle bin, it is permanently deleted (just as if the drive were a network share);

2. If a subst’d drive is created using ADMIN privilege, it is NOT visible to a non-admin privileged account and vice-versa. Try it and see – start a cmd prompt with elevated privileges, create the subst’d drive, and try to access it from Windows Exploder. It doesn’t appear. Now open Explorer with admin privileges, the drive appears. Do the same thing with an non-elevated cmd prompt and the opposite is true.

Despite these limitations the use of subst drives can be extremely useful, especially for long paths.


Questions & Answers