Did you know that Microsoft Windows allows you to define virtual disk drives? Any drive letter that is not currently used to represent a physical drive can be defined as a virtual drive. What is a virtual drive? It’s a folder of a physical drive that acts like it is a separate drive, unto itself. Some reasons you may a want, or need, to do this are:
- As a handy shortcut.
- Because some software requires it.
- In a batch file, so that the path only needs to be referenced once at the top of the batch file, and therefore could be easily changed later, if need be.
Pretend that you have a file folder called C:\data\word_docs, that you use it constantly, and that you would like to refer to it with a shortcut of W:. Open up a command prompt window and issue the following command:
SUBST w: C:\data\word_docs
SUBST is short for substitute. (DOS commands are case-insensitive, so you could enter it as “subst” as well.) So, now, W:\intro.doc is the same thing as C:\data\word_docs\intro.doc — two different ways to refer to the same file.
If you ever move the folder, and want to change the shortcut, just reissue the SUBST command:
SUBST w: D:\new_location\word_docs
source