How to Create Virtual Drive for Any Folder

February 10th, 2010 Tanmay

Using a computer is so easy. But using that computer efficiently requires some tricks. Suppose the location of a folder that you use frequently is E:\Wallpaper\Themes\Animals\Birds. So every time to use the folder Bird you will have to navigate the path. It is more time consuming and boring.

Read also: How to turn computer in virtual machine)

But if we can separate our important folders and keep them in a separate drive in your computer then will not be a great? But creation of a new drive in your computer is a complex and risky task. But creation of virtual drive is a better way to organize your most frequently used folders. The process of creating a virtual drive has been described in this article. You can create different virtual drives for different folders by a simple dos command.

  • Press Windows Key+ R to open the “Run” dialogue box.
  • Type “cmd” and hit enter.

Now in the Command Prompt type the following command :

subst <desired drive name>: <folder path>

For example:

subst j: E:\Wallpaper\Themes\Animals\Birds

create-virtual-drive-for-folder-command-prompt-command

See also: Google has released Chrome OS Virtual Appliance

Now the virtual drive you have created will appear in the My Computer window. The appearance of that drive will same as the other drives. You can now access the files under the folder directly from the drive in “My Computer” window.

create-virtual-drive-for-folder-my-computer-window

If you want to delete the virtual drive then just put the following command in the “Command Prompt

subst <virtual drive name>: /D

create-virtual-drive-for-folder-command-prompt-delete-command

But in the above process the virtual drive, you’ve created will be disappeared after restarting your computer. So you have to repeat the same task again. I think this is annoying. So to make permanent the virtual drive in your computer, you may apply a small but excellent tweak. Here I’ve described step by step.

  • Open Notepad and type the following batch commands.

echo off
cd\
subst <desired drive name>: <folder path>

Repalce “<desired drive name>” with your own choice, make sure that the drive name is not already assigned. Replace “<folder path>” with the location of the folder that you want to use as a virtual drive. Now save the Notepad file as vdrive.bat in C:>Windows > system32

Now you have to run the batch file automatically. To do so follow the steps below

  • Go to Start > Run and type regedit.
  • In the registry editor navigate to the following path

HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows > CurrentVersion > Run

On the right pane create a string value by right clicking and then “New > String Value”

create-virtual-drive-for-folder-batch-file-registry

  • Name it as Vdrive.
  • Right click on the string then select Modify.

create-virtual-drive-for-folder-batch-file-registry-modify

  • In the value data field put “c:\windows\system32\Vdrive.bat” and click OK

create-virtual-drive-for-folder-batch-file-registry-value

Now restart your computer and watch that the virtual drive has been created. This virtual drive is fixed and will be deleted never until you delete.

The method is applicable for Windows 7, XP, as well as Windows Vista.

Reader Comments

  1. s!d

    it’s ok, but running it on statup is a good idea.
    keep it up.

    December 24th, 2009 at 15:48
  2. tanmay

    @S!D
    Thank you.

    December 24th, 2009 at 23:32
  3. Chiranjit

    It really works.
    Thank you buddy.

    December 26th, 2009 at 08:24