Substitute a drive letter for a network or local path.
Syntax SUBST drive_letter: path SUBST SUBST drive_letter: /D Key SUBST with no parameters will display current SUBST drives /D : Delete the drive_letter substitution.
Compared to mapping a drive with NET USE the SUBST command allows
mapping to a subfolder of a drive share - for the storage of user profiles this
reduces the number of shares you need to create on the server.
Under NT 4 SUBST'ed drives could be disconnected using the Explorer GUI - this was fixed in Windows 2000.
In Windows 2000 (and above) you may have problems creating, accessing and deleting drive mappings with SUBST.
However under Win 2K/XP the functionality of the NET USE command is improved so you can now do
NET USE g: \\server\share\folder1\folder2
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 - depending on your application this may be a good or a bad thing - a subst drive that is not available will badly impact performance of most applications.
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.
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.
"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)
NET USE - Map a drive letter to a network drive