• Mapping a Folder to a Drive Letter using SUBST

    The Windows OS has been able to do this for quite some time.  Let say you have a folder deeply nested within your filestructure that is used often.  Normally you can just Right-Click the folder and drag it to your desktop to make a shortcut, but what if you are doing work via the command line.  Accessing a desktop shortcut is out of the question.

    You could always just use the good ole tab key to quickly fill in the destination, but wouldn’t it be much easier to just make the folder appear as a drive.  Instead of using “cd folder1/folder2/folder3/folder4/etc” to access it, you would just type the assigned drive letter followed by a colon.

    To map a drive letter to a folder do the following:

    1. Either pull up a command prompt, or this can also be completed with the RUN command in the start menu.
    2. To set a folder to driveletter Z: do the following
      subst Z: "C:\Folder1\Folder2\Folder3\Folder4\etc"
    3. To remove the mapped drive:
      subst Z: /D


    Leave a reply