Tag Archive for 'CMD'

assign a drive letter to a folder

One function that is under used in windows is the SUBST command.  It allows you to map a drive letter to a local folder.  This is useful when you are dealing with large directory paths or you want a quick and easy way to access a frequently used folder.

I will use a relativity short folder structure here but you will still be able to see the benefit of this command.

If we have a bunch of files located in the folder C:\- data\code\project\USB (graphic1) each time we want to use them we need to navigate through the folder structure to access them.  Surprisingly time consuming…

Would it not be easier just to go to a driver letter like T:\?

Sure it would, so let get it done!

  1. Fire up the command prompt
    1. CLICK start > run
    2. Type CMD and click OK
    3. You should now be presented with the command prompt screen
  2. Assign a drive letter to a folder (graphic2)
    1. Type subst t: “C:\- data\code\project\USB” (you can substitute t: for any free drive on your system)
    2. Type t: press enter or check it through windows explorer (graphic4)
  3. Show subst options(graphic3)
    1. Type subst /?
  4. To display a list of current virtual drives.
    1. Type subs

If you suffer from acute command line phobia you can check out the great utility visual-subst this will do everything you need from the comfort and security of your well loved GUI.

graphic1

graphic1

graphic2

graphic2

graphic3

graphic3

graphic4

graphic4