Sunday, June 24, 2012

Assign Drive Letters to Folders

This tip is really great if you have some folders on your computer that you are working very often with. Instead of navigating to the folder on the hard drive you assign a drive letter to that folder and can access it like it was a partition or hard drive on your computer. It is very easy to assign a drive letter to a folder, to do that, do the following:
Click Start, Run and enter cmd. This should open the command line interface of your windows operating system. The command that we need is the “subst” command and we use it the following way.
subst drive folder
Lets say you want to assign the drive letter X to the folder d:\movies on your hard drive. To do that you write the following command:
subst x: d:\movies
That is all. Fairly easy isn’t it? Now the drive letter x: remains accessible as long as you do not turn off or reboot windows. If you want to make this permanent you will have to do the following.
Create a new file and name it drive.bat. Edit the file and add the line subst x: d:\movies to it and save it.
subst virtual drives folders
Right click the Start button, select Open All Users. Open Programs, Startup and right click that location. Select New Shortcut, and select the drive.bat file that you created. Select Next and finish. The command will be executed for all users with every startup of windows.
If you are running for example Windows 95 you could edit the autoexec.bat and add the line there.
Update: If you do not like to work with the command line or bat files, you could head over to NTwind to download Visual Subst instead, which is a gui version of the program. Source: