Associates a path with a drive letter.
The drive letter you assign represents a virtual drive, because you can use the drive letter in commands as if it were a physical drive.
Do not use the SUBST command when Win3.0+ is running.
SUBST [drive1: [drive2:]path]
SUBST drive1: /D
Display names of the virtual drives in effect:
For information about increasing the number of available drive
letters, see the LASTDRIVE command.
Also see UNDOCUMENTED command: TRUENAME.
NET USE - Map a drive letter to a network drive.
Under Windows 2000 you may receive an "Access denied" error message. This behavior occurs if you are using a domain user account. (Q258625)
Notice that when SUBST is used against a local shared folder, it will create a RECYCLER for that drive. The RECYCLER is not removed when the drive substitution is removed, but can be deleted manually.
These commands do not work, or should not be used, on drives used in the SUBST command:
The drive1 parameter must be within the range specified by the LASTDRIVE command. If not, SUBST displays the error message:
Invalid parameter - drive1:
Do not create or delete virtual drives using the SUBST command while Microsoft Windows is running. If you want to create or delete a virtual drive using the SUBST command, quit Windows, create or delete the virtual drive, and then start Windows again.
You can use SUBST to associate a path on a compressed drive with a drive letter. However, the drive size and free space of the SUBST drive (for example, as reported by the DIR command) might not match the drive size and free space reported for the compressed drive.
This command creates a virtual drive Z for the path B:\USER\BETTY\FORMS:
SUBST Z: B:\USER\BETTY\FORMS
Now, instead of typing the full path, you can reach this directory by typing the letter of the virtual drive, followed by a colon, as in:
This example works only if you have included the line LASTDRIVE=Z in your CONFIG.SYS file to define Z as the highest letter that the operating system recognizes as a disk drive. For more information, see the LASTDRIVE command.