Have you worked with folders that hides deeply in Windows and it’s really troublesome when you want to access the folder? Sometimes we’re unable to move the folder to desktop or at any convenient location because maybe the software requires it to be there as it is hardcoded or it can even act as a handy shortcut.
Good news is Windows allows you to define any drive letter that is not currently used to represent a physical drive as a virtual drive. Virtual drive is a folder of a physical drive that acts like it is a separate drive, unto itself. The concept is the same as mapping network drives. Only difference is it maps local folders instead of network shares.
Here’s how to map local folders or directories to drive letter.
There is a very old DOS command “SUBST“, which is short for substitute that allows you to substitute a folder on your computer for another drive letter. SUBST is an external command and surprisingly it was available since MS-DOS 3.1 up till XP. (I haven’t test this on Vista yet).
Let’s say I very frequently need to access “Data” folder in C:\Google\Is\King and now I want to map it to a X: drive which is currently unused. The command I should use in command prompt (cmd) is:
SUBST X: C:\Google\Is\King\Data

To find out what virtual drives are currently defined, just type SUBST on a line by itself. If you want to remove the association, you can either restart your computer which will clear the SUBST command or use the /D switch. (Example, SUBST X: /D)
If you don’t know how to types those command, here’s an even easier method. Just download the free, small and portable Virtual Subst created by NTWind Software.

Visual Subst is a small tool that allows you to associate the most accessed directories with virtual drives. It uses the same API similar to the console ‘subst’ utility, but makes it easier to create and remove virtual drives in a GUI way. Just select the drive letter you want it to map, then click the magnifying glass icon to browse the folder that you want to map and click the plus icon. There is a checkbox which you can apply virtual drives on Windows startup. Remember that the DOS SUBST command doesn’t retain the substitute command after restart.
Related posts:
Great information!
I tryed sharing a folder and then mapping it as a drive but it doesn’t work if you’re not connected to a network.
This way is definetely the elegant way of doing it.
Thank you!
Thanks a lot for sharing this information!
using SUBST is definitely one of the fastest way of creating mapped drives.
Thanks again
Why wouldn’t you just share the folder and map it to a drive using the built-in “Map Network Drive”. If you’re concerned about the visibility of the share on a network, simply add “$” to the end of the share name and adjust your share permissions.
You could make a batch file to do the job. Then you could put it in your startup folder and BAM!!
Great info, great tool. Managed to use up almost all of my drive letters :-)
Life saver, thanks!!
Thats Nice
>Now, if only I could find a way to run that command on startup every time I logged in
Great tip.
I just lost an external drive that contained files referenced in other projects, I could do with losing “E:”. Luckily the software will never know those files are gone since I mapped the backup folder to E:\.
Now, if only I could find a way to run that command on startup every time I logged in…
It works on Vista as well. jfyi :)
A good piece of knowledge and trick.
Can you suggest me any way by which the contents of a drive can be read by our java program in the same way as those of any folder?
I want to search a particular drive for certain files. But my program can only search folders one by one and not drive directly.
Great tip – thank you.
If there are spaces in the pathname then enclose it in quotes as follows:
SUBST S: \\\”C:\\\\Documents and Settings\\\\John\\\\My Documents\\\\mdbApps\\\”
Great tip!! Have been working in dos for long time but never knew about it. Worked out great for me!
By the way,
I’ve translated this useful article Here:
zangoole.com/1386/12/04/subst_command/
Hi Raymond.
I think It\’s \”Visual Subst\” not \”Virtual subst\”.
Thanks for your useful trick.
(Dont you think your CAPTCHA is quite uncomfortable?)
That’s right. If you use SUBST in command prompt, after restart, the virtual drive will be lost.
Does
“Remember that the DOS SUBST command doesn’t retain the substitute command after restart.”
mean
“If using the DOS command, all virtual drives will be lost on restart?”
Old DOS Command,… I always use some DOS commands to solve my trouble. Thanks Ray… in the some cases, “THE OLD IS THE GOLD”.
SWEET, never thought about it, but this is µber :P
That remindes me some old, old time when i usualy need this SUBST command working with MS-DOS…
Hi, don\’t know if anybody can help me with problem. I\’ve been trying to install my new printer but everytime it try\’s to install it comes up with this error \”specified port unknown\” someone told me to change I/O config in BIOS but my computer doesnt even have that option. is there anything else i can do?
Is there any real benefit for this besides an alternate access route to a folder? I could just make a shortcut on my desktop to the the specific folder that I want to open instead of mapping it to a drive letter.
Seems like something I would need. Thanks!
In the past, I used Drive Manager ( alexnolan.net/ )
It can substitute drive letters for local folders.
Hi Raymond, you made me remember years ago when i used subst to fake first games that used cdrom. Then it came more difficult, so changed to virtualdrive 2000, and then using daemon tools or nero image drive. Well times go by….
Great tip, thanks
In short, it’s mapping folders to a drive letter.
ugh, I appreciate this entry but I just dont get a thing you’re sayin’ =P