How to Mount a Folder as Virtual Drive in Windows 11 / 10

August 16, 2022 updated by Admin Leave a reply »

Is it possible to mount a directory as a drive in Windows 11? You can use the built-in command subst in Windows to mount any folder as a drive, so you can access the contents of that folder from either the original location or your virtual drive. In this tutorial we’ll show you how to mount a folder as virtual drive in Windows 11 / 10, without using third-party software.

How to Mount a Folder as Virtual Drive in Windows 11 / 10

  1. Right-click the blank area of desktop and choose New -> Shortcut.

  2. In the location box, enter the following command. Replace folder_location with the full path of the folder which you would like to mount and Z: with the letter of the virtual drive.
    subst Z: "folder_location"

  3. Type the shortcut name of your choice, and click Finish.

  4. Double-click the newly-created desktop shortcut, and a virtual drive will appear in File Explorer.

Dismount the Virtual Drive

When you log off your user account or restart the computer, the virtual drive will dismount automatically. The next time you sign into Windows, the virtual drive will not show up and you need to double-click the desktop shortcut you created earlier to mount the folder as a virtual drive.

If you need to dismount the virtual drive immediately, follow these steps:

  1. Right-click the Start button in the taskbar and select Windows Terminal.

  2. Execute the following command. Replace Z: with the letter of your virtual drive.
    subst Z: /d

    Note: If you open Windows Terminal as administrator, you’ll get the error message “Invalid parameter” when you run the above command.

That’s it!