This tutorial will show you how to temporarily mount a folder as a virtual drive with a drive letter for only your account in Windows 10 and Windows 11.
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. If you sign out, restart the computer, or shut down the computer, all current virtual drives will be removed (unmounted) by default.
Reference:

subst
You can mount the same folder as multiple virtual drives if wanted.
You can rename a virtual drive to what you want. If you rename the virtual drive, this name will be persistent each time you mount the same folder path using the same drive letter unless cleared.
If you rename or delete a folder while it's mounted as a virtual drive, the drive will show as unknown, and you will get a "Location is not available" error when trying to open the drive. This will clear when the virtual drive is unmounted.
- Option One: See List of All Current Folders Mounted as Drive
- Option Two: Mount Folder as Drive
- Option Three: Manually Unmount Folder as Drive
EXAMPLE: Folder mounted as drive
1 Open Windows Terminal, and select either Windows PowerShell or Command Prompt.
2 Type the command below into Windows Terminal, and press Enter. (see screenshot below)
subst
3 You will now see a list of all current virtual drives each with their folder location.
1 Open Windows Terminal, and select either Windows PowerShell or Command Prompt.
2 Type the command below into Windows Terminal, and press Enter. (see screenshot below)
subst <virtual drive letter>: "Full path of folder"
Substitute <virtual drive letter> in the command above with a drive letter (ex: "F") you want 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\Example Folder") you want mounted as a virtual drive.
For example: subst F: "C:\Users\Brink\Desktop\Example Folder"
3 You can now close Windows Terminal if you like.
1 Open Windows Terminal, and select either Windows PowerShell or Command Prompt.
2 Type the command below into Windows Terminal, and press Enter. (see screenshot below)
subst <virtual drive letter>: /d
Substitute <virtual drive letter> in the command above with the drive letter (ex: "F") of a virtual drive you want to remove.
For example: subst F: /d
3 You can now close Windows Terminal if you like.
That's it,
Shawn Brink