Microsoft DOS subst command

Quick links

About subst

About subst

Allows you to substitute a folder on your computer for another drive letter.


The subst.exe command is an external command that is available in the below Microsoft operating systems.

MS-DOS 3.1x and above
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Windows 8


Associates a path with a drive letter.

SUBST [drive1: [drive2:]path]
SUBST drive1: /D

drive1:Specifies a virtual drive you want to assign a path.
[drive2:]pathSpecifies a physical drive and path you want to assign to a virtual drive.
/DDeletes a substituted (virtual) drive.

Type SUBST with no parameters to display a list of current virtual drives.


subst a: .

Sets the directory you are in and subdirectories thereafter into the A: drive. So if you were to type A: after doing this command you would see everything in the directory that you typed this command in.

If you were to reboot your computer this will clear the SUBST command and put your drives back to original letters (unless command placed into the autoexec.bat).

Tip: You cannot subst network drives and after a drive has been created you cannot give the new drive a new label.