Create a virtual drive in Windows

June 13th, 2007 16:06

If you need to test your code on a Windows box with multiple drives but don’t want the hassle of partitioning check out the SUBST command. For example, to create a J: that will mirror your desktop:

c:\\>subst j: "c:\\Documents and Setting\\username\\Desktop"

To remove one of these virtual drives use the /D flag:

c:\\subst /D j:

Remember, this is only a virtual drive. Changes you make in the real directory are reflected on the virtual drive and vice versa.

Leave a Reply