How to Create Virtual Drive for Any Folder

Posted by 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.

This post was written by Tanmay

Reader Comments

  1. s!d

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

  2. tanmay

    @S!D
    Thank you.

  3. Chiranjit

    It really works.
    Thank you buddy.

  4. HIMANSHU

    yeah it really work….thanx

  5. samar

    Really good buddy it works !!!!

  6. Chuck

    Am I missing the point of this? Why not create a shortcut on the desktop to the folder that is multiple levels down? Better yet why would anyone use such a folder structure for such an important folder? The reason subfolders exist is to subordinate the information related to the top level folder. If it is an important folder it clearly should be top level. Seems you are creating solutions to problems that are best avoided in the first place.

  7. Tony

    Seriously, why go through all the trouble when you can just create a desktop shortcut for that folder. Or if you want to make things unnecessarily complicated but don’t want to muck about in the registry why not just share the folder and then map it as a drive? And for added fun just create a desktop shortcut for that mapped drive… weeee!