How to Mount Folder as Virtual Drive in Windows 7, Windows 8, and Windows 10
In Windows, you can mount any folder at any location as a virtual drive with a drive letter.
When you mount a folder as virtual drive, you will be able to access the folder from the virtual drive. The contents of the folder will still physically be located in the folder. Anything you save into the virtual drive will actually be saved to the folder's location.
Virtual drives from mounted folders are not persistent and only available during the current user session by default. If you sign out, restart the computer, or shut down the computer, all current virtual drives will be removed (unmounted).
See also:
This tutorial will show you how to mount any folder as a virtual drive with a drive letter in Windows 7, Windows 8, and Windows 10.
Contents
- Option One: See All Current Virtual Drives for Mounted Folders
- Option Two: Mount Folder as Virtual Drive
- Option Three: Remove Virtual Drive for Mounted Folder
- Option Four: To Always Mount Folder as Virtual Drive at Startup
EXAMPLE: Folder mounted as virtual drive in Windows 10 File Explorer > This PC
1 Open a command prompt.
2 Typesubst
into the command prompt, and press Enter. (see screenshot below)
3 You will now see a list of all current virtual drives.
1 Open a command prompt.
2 Type the command below into the command prompt, and press Enter. (see screenshot below)
subst <virtual drive letter>: "Full path of folder"
Substitute <virtual drive letter> in the command above with a currently unused drive letter (ex: "G") you want to be assigned to the virtual drive.
Substitute Full path of folder in the command above with the actual full path of the folder (ex: "C:\Users\Brink\Desktop\Any Folder") you want to be mounted as a virtual drive.
For example:subst G: "C:\Users\Brink\Desktop\Any Folder"
3 If you like, you can rename the virtual drive to what you want.
The virtual drive will have the same name as the source drive/volume of the folder by default.
If the source drive/volume of the folder has been renamed, then the virtual drive cannot be renamed.
If you rename the virtual drive, this name will be persistent each time you mount the same folder path using the same drive letter.
4 You can close the command prompt if you like.
This option can be handy when you want to remove a virtual drive for a mounted folder without having to sign out, restart the computer, or shut down the computer.
1 Open a command prompt.
2 Type the command below into the command prompt, and press Enter. (see screenshot below)3 You can close the command prompt if you like.
subst <virtual drive letter>: /d
Substitute <virtual drive letter> in the command above with the drive letter (ex: "G") of a virtual drive you want to remove.
This option allows the folder to always be mounted as a virtual drive even after you sign out, restart the computer, or shut down the computer.
1 Open Notepad.
2 Type the commands below into Notepad. (see screenshot below)
@echo off
subst <virtual drive letter>: "Full path of folder"
Substitute <virtual drive letter> in the command above with a currently unused drive letter (ex: "G") you want to be assigned to the virtual drive.
Substitute Full path of folder in the command above with the actual full path of the folder (ex: "C:\Users\Brink\Desktop\Any Folder") you want to be mounted as a virtual drive.
For example:
@echo off
subst G: "C:\Users\Brink\Desktop\Any Folder"
3 In Notepad, press the Ctrl + S keys OR click/tap on File (menu bar) and click/tap on Save to save this as a batch (.bat) file. (see screenshot below)
4 Perform the following actions in the Save As dialog: (see screenshot below)
1) Navigate to where (ex: "Desktop") you want to save the .bat file.
2) Select All Files (*.*) in the Save as type drop menu.
3) Type a name you want for this batch file along with the .bat file extension.
It is recommended to name the .bat file something to let you know which folder it is mounting as a virtual drive. For example: G-Any Folder.bat
4) Click/tap on Save.
5 You can now close Notepad.
6 Open File Explorer Win + E.
7 Save a copy of the .bat file into the Startup folder(s) of the user(s) you want to always have the folder mounted as a virtual drive. (see screenshot below)
You will need to be signed in as an administrator to save a copy of the .bat file into the Startup folder of another user or for all users.
To undo this for a virtual drive, delete its .bat file in the Startup folder.
Startup folder location for user:
C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
Startup folder location for all users:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
8 You can now close File Explorer.
That's it,
Shawn
Related Tutorials
- How to Mount a Drive to a Folder in Windows 10
- How to Create Soft and Hard Symbolic Links in Windows
- How to Map Network Drive or Disconnect Network Drive in Windows 10
- How to 'Pin to taskbar' a Folder and Drive in Windows 10