Substitute a drive letter for a network or local path.

      SUBST drive_letter: path


      SUBST drive_letter: /D

   SUBST with no parameters will display current SUBST drives

   /D : Delete the drive_letter substitution.

The SUBST command can be used to map a drive letter to a LOCAL folder on the same machine. In early versions of Windows SUBST also provided some drive mapping options that are now covered by NET USE.

If the network resource is unavailable (ie the server is down) SUBST will continually retry - unlike NET USE which will try to connect once and fail - a subst'd drive that is not available will badly impact performance of the computer.

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.

If you map a drive with the NET command, use the NET command to remove it, similarly if you substitute a drive letter with SUBST then use the SUBST command to remove it.

Undocumented behaviour: if a drive is substed using characters other than A-Z ($,#, :, !, 0-9) it will not appear in Windows Explorer or in the drives reported by SUBST.


Subst the path D:\work files\April\ for the drive letter P:

C:\> subst p: D:\work files\April\

Remove the drive subst from P:

C:\> subst p: /d

"A man should never be ashamed to own he has been in the wrong, which is saying in other words, that he is wiser today than he was yesterday" ~ Alexander Pope (thoughts on various subjects)

Related commands

NET USE - Map a drive letter to a network drive.

Copyright © 1999-2023
Some rights reserved