Name

Subst — \windows\system32\subst.exe

Synopsis

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

To Open

Command Prompt subst

Usage

subst [drive:] [path | /d ]

Description

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

Notes

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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.