Forrest logo
back to the subst tool


subst: List active associations.
$ subst
try on your machine

The "subst" command in the Windows command prompt is used to create a virtual drive that represents a path on the hard drive. It allows you to assign a drive letter to a folder/directory path, making it easier to access and work with.

The syntax of the "subst" command is as follows: subst [DriveLetter:] [Path]

  • [DriveLetter:] defines the letter you want to assign to the virtual drive. It can be any valid drive letter not already in use by another drive.
  • [Path] specifies the folder or directory path that you want to associate with the assigned drive letter.

For example, if you want to create a virtual drive with the letter "X" and associate it with the folder "C:\Documents", you would enter the following command: subst X: C:\Documents

Once the command is executed, whenever you access the "X:" drive, you will be directed to the "C:\Documents" folder, as if it were a separate drive. This can be helpful in situations where you frequently navigate to a specific folder and want quick access to it.

To remove the virtual drive, use the subst command followed by the drive letter and a colon without specifying a path: subst X: /d

This will delete the virtual drive associated with the drive letter "X".

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the subst tool