Subst — \windows\system32\subst.exe


Create a new drive letter that is linked to a folder on your hard disk.

To Open

Command Prompt subst


subst [drive:] [path | /d ]


Subst is a neat little utility that creates a new drive letter and actively links it to an existing folder on your hard disk. For example, type:

subst z: c:\my documents\downloaded music\led zeppelin

to create a new drive letter, z:, and link it to the folder c:\my documents\downloaded music\led zeppelin. When you open drive Z: in Explorer, you’ll see the contents of the linked folder; this is very useful if you access a particular folder frequently but find Windows Shortcuts too limiting. For example, a drive created with Subst allows you to access a file in the folder, like this: z:\stairway.mp3. To disconnect a Subst’d drive, type:

subst z: /d


Any drive letters created with Subst are forgotten when the computer shuts down. To have drives re-Subst’d every time you turn on your computer, write a batch file or WSH script (see Appendix C and Chapter 8, respectively) and place it in your Startup folder.

Get Windows XP in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.