Sunday, August 3, 2008

Converting a Folder into a Drive


Here's a trick which allows you to use any folder as a drive in Windows. This trick comes very handy when you use a particular folder often, and want to quickly access it like in Command Prompt. It actually adds a new drive in My Computer with your specified drive letter(whatever you specify) and that drive actually points to your designated folder. Once you open the drive, you can access the folder.

The DOS command SUBST is used to create a virtual drive allowing you to add any file path and used as a drive.

SUBST [drive1: [drive2:]path]

drive1: Specifies a virtual drive to which you want to assign a path.
drive2: Specifies a physical drive and path you want to assign to a virtual drive.

For example, to create a virtual drive with a specified path:

  • Find a folder you want to use as a drive and remember its path. For demonstration i will be using ‘H:\sid’ as the path.
  • Open Command Prompt and type “subst drive-letter path
  • For example, type “subst z: H:\sidand press Enter.


Now you can easily access that folder by just typing z:


Removing the Virtual Drive:

To remove the virtual drive, go to Command Prompt, and type subst z: /D.

/D Deletes a substituted virtual drive.

exclaimEnJoYexclaim

6 comments:

Abhinav Viswambharan said...

That was quite informative...

Anonymous said...

Simple and awesome trick. Thanks Sid.

Angel said...

Hmmmph !
i am not aware of all this, anyways it should be usefull when i need it. someday !

Dan* said...

cool ....... keep rocking !!!

Raj Dhoreliya said...

REALLY COOL BLOG MAN...
u the man

Gagan said...

hmm gonna try this one !