PDA

View Full Version : Creating logical drives on the fly with Subst


Micron
05-04-2006, 07:08 PM
You can create any folder on your system as a logcal drive with an assigned letter and if you have very deep directories (directories with many sub directories inside sub directories), you may find it easier to create a logical drive that points to the directory you want to work in. On the other hand, you may want to simply create aliases to existing drives for those programs looking for a particular drive. Whichever the reason you want to create a logical drive, you can do so using the SUBST command.

For example, to create an alias assigned to G for your C drive, run following command from Start > Run (or the "DOS Prompt"):

SUBST G: C:\

To create a logical drive called H, that points to your C:\WORK directory:

SUBST H: C:\WORK

To delete the aliases or logical drives that you create using SUBST command, run SUBST with the drive name to delete and the parameter "/D"

SUBST G: /D

SUBST H: /D

All these virtual drives will not be assigned on reboot, unless you create a shortcut or batch file in the start up folder.

cfryback
14-04-2006, 01:20 PM
Use this all the time when I log in as sysadmin on servers or PC's to install software, as the sysadmin account doesn't have a network "V" drive for documents and settings....

Micron
14-04-2006, 01:23 PM
Cool

Its a handy trick - I have a batch file to remember mine on boot, makes things so handy and quick.