Map a Drive Letter to a Local Folder
Have you ever had a frequently used folder such as a web root or download folder that you had to navigate to on a regular basis and wished you could just access using a drive letter? Did you know that it is very possible and quite easy to map a drive letter to a local folder? Let the Windows Guru show you how to have this up and running in under thirty seconds!
On my system I have several folders that I navigate to on a regular basis. Some store development projects, others are web roots for testing web applications, and other document or music folders. Have to constantly navigate and remember long paths is both tedious and a nuisance.
It’s widely known that Linux and Unix systems have offered symbolic links to alleviate this. In fact, the usage is extremely common on those systems. What you may not know is that Windows has long since offered scarcely publicized solution as well called Virtual Directories.
In Windows, virtual directories allow you to access local folders using drive letters as if they were local disks instead. The process is quite comparable to mapped network paths.
You’ll need to use the command line to set up your virtual directory so head over to the start button and choose Run.. to open the Run… dialog box. Now type cmd and press Enter to launch a Command Prompt window.
The command for creating virtual directories is subst and the syntax is very simple. It accepts two parameters: the first is the available drive letter to be mapped and the second is the full path to the folder you wish to create a virtual directory for. So if you wanted to map drive W: to your local IIS web root, you would use a command like this:
subst W: C:\inetpub\wwwroot
It’s as simple as that! You can now access your IIS web root by simply opening the W: drive. This setting is persistent which means that your drive letter will remain mapped through reboots until you explicitly remove it.
A couple of things to keep in mind: Do not provide a trailing slash on your folder path. Subst will incorrectly return a path not found error. (Or at least has been my experience on Windows XP systems). You should also remember to enclose your path in quotes if it contains and spaces.





























August 20th, 2009 at 6:09 am
Thank you soo much!!! Worked a treat with my Vista!