Monday, June 15, 2009

Assign Drive Letters to Folders

Give a folder its very own drive letter


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 own partition or hard drive on your computer. It is very easy to assign a drive letter to a folder, do the following:

Click Start, Run and enter cmd.

. The command that we need is the “subst” command and we use it the following way.

subst, drive letter, folder name

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

So, now, "X:" is the same thing as
"D:\movies — two different ways to refer to the same file.

That is all. Fairly easy isn’t it ?




Neat, short way to access files in an oft-used folder. But, be warned: when a folder is mapped like this to a drive letter, file deletions bypass the Recycle Bin and are unrecoverable using usual methods.

Associates a path with a drive letter.

SUBST [drive1: [drive2:]path]
SUBST drive1: /D

"drive1:" Specifies a virtual drive to which you want to assign a path.

"[drive2:]"path Specifies a physical drive and path you want to assign to
a virtual drive.

"/D" Deletes a substituted (virtual) drive.

Type SUBST with no parameters to display a list of current virtual drives.


You can get info on a DOS command by typing the command, then a space and /?
eg:

SUBST /?

Removing the Virtual Drive which we have Created "X"

subst X: /d

this just removes the virtual drive, so no worries about removing the underlying folder.


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.

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.

Or open RUN dialog box paste the following code in it and hit Enter.

C:\Documents and Settings\All Users\Start Menu\Programs\Startup


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.




You Can ADD as many Folders as you want by adding Space in Between as shown in the above figure.

In case if you don't no how to create "drive.bat file" Download the file Link Given below.


Link to Download:
http://www.ziddu.com/download/5200214/Driver.rar.html



No comments:

Post a Comment