85
32
I have a directory on another drive that I want to show as a new virtual drive. How can I do that?
85
32
I have a directory on another drive that I want to show as a new virtual drive. How can I do that?
110
Use the subst
command:
subst X: F:\some\folder
There is also a great freeware utility called Visual Subst to make things even easier:
16
I used the registry edit on wikipedia so Windows would automaticaly create the drive when starting (tested on Windows 8.1):
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices
X:
C:\some\directory
with the folder path):
\??\C:\some\directory
\DosDevices\C:\some\directory
\Device\Mup\127.0.0.1\C$\some\directory
Another option is to use a VHD (or use a USB and skip steps 2 - 4):
See also:
Thanks; tested on Windows 7 and it works. Only way I could find to mount a directory that has a path beginning with \Device\Mup\ – petehern – 2017-02-23T21:39:01.350
@petehern Which method was the one that worked for you, the regedit method, or the VHD method? – Glenn Slayden – 2017-12-17T00:37:00.353
I used the regedit method. – petehern – 2017-12-18T03:06:09.230
is there a way to change the volume label for the registry option? It is confusing that the label of the source drive is used, – vlad_tepesch – 2019-03-11T12:21:50.870
@vlad_tepesch The volume label can be changed from X to what ever label you want in step 3. Step 4 you specify where the VHD is, so it has to be the source drive. – Trisped – 2019-03-14T22:06:06.960
@Trisped you misunderstood 'volume label'. I did not meant the drive-Letter but the label that is shown in the explorer – vlad_tepesch – 2019-03-18T12:18:16.773
@vlad_tepesch I don't know. There is a mention of SUBST in the Wikipedia link, but that indicates that the source drive/volume must not have a label. If I was you, I would ask it as a new question. – Trisped – 2019-03-18T20:48:26.003
2
Apart from the suggested ways, you could do one more thing. Share the folder and Map as network drive. Here are the steps:
Step 1: Share the required folder. (You can just share with yourself or Admin group)
a.Right Click on the Folder and select Share with specific people
b.Click Share button on the share with dialog.
c.Copy the share path that is generated.
Step 2: Map the network drive
a.Click on Map Network drive in windows explorer
b.Once it launches, use the previously copied path as the network location.
c.Click on finish and you are done. Make sure to click on Reconnect on logon.
Benefit is that you get to see the drive grouped separate from other physical drives.
1Note that this requires Network Discovery to be turned on which you may or may not want depending on which network you're connected to. – Daryn – 2019-11-25T15:22:07.897
1This utility indeed lets me mount a folder as a drive and it (or windows) assigns this new drive the same name as the drive where the source folder resides. When i try to rename that new drive, windows gives me an error about improper volume name. Is there any way i can fix this and have this new drive named the way i want? – RusI – 2014-10-31T04:14:24.143
1yes I tried this before, but it doesnt auto-mount the dir on boot. – user11955 – 2010-02-16T04:20:36.153
5At the bottom of the application there is a checkbox Apply virtual drives on Windows startup if that's what you're after. You could also use a batch script with subst commands and place it in your startup folder. – John T – 2010-02-16T04:24:14.473
1I realize that the option is there, it just doesn't work.
probably because I have a space in the folder name (that I cant remove) – user11955 – 2010-02-16T04:30:07.690
4Possibly. There is also the startup folder in your start menu you can use. Make a batch script with subst commands in it and quote the paths with spaces. An example of 1 line would be
subst X: "C:\Program Files"
– John T – 2010-02-16T04:31:53.067Same question as Rusl: can we change the virtual drive volume label? – Konerak – 2017-07-05T09:54:31.953
1Or add it as a run entry in the registry. It gets processed and the subst drive gets added quite early in the boot process then. – Fiasco Labs – 2012-10-01T15:31:15.443