The subst command lets you substitute a virtual drive letter for another drive letter on your computer.
Availability
Subst is an external command that is available for the following Microsoft operating systems as subst.exe.
Availability
Subst syntax
Subst examples
MS-DOS 3.1x and above
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Windows 8
Windows 10
Windows 11
Subst syntax
Associates a path with a drive letter.
SUBST [drive1: [drive2:]path] SUBST drive1: /D
Type SUBST with no parameters to display a list of current virtual drives.
Subst examples
subst a: .
Sets the current directory and subdirectories as the A: drive. So, if you were to type A: after executing this command, you would see everything in the directory from which the command was run.
If you reboot the computer, any subst command is cleared unless it was placed into autoexec.bat or another location that’s executed upon starting the computer.
You cannot subst network drives and after a drive is created, you cannot give the new drive a new label.