'Turn' a folder into a virtual drive on Windows 10

On Windows, users can easily "attach" one or more folders to a virtual drive on Windows for faster access when needed. And anything saved to the virtual drive will be saved to the location of that directory. Folders "mounted" as virtual drives will not appear continuously, but only present in the current user session by default. If you log out, restart or shut down the computer, all existing virtual drives will be erased (no longer attached).

'Turn' a folder into a virtual drive on Windows 10 Picture 1

If you are interested, this article will show you how to turn any folder into a virtual drive on Windows for faster access when needed, please read the reference.

Mount the folder as a virtual drive

Open Windows PowerShell and enter the "subst" command, then press ENTER to browse through the list of virtual drives currently available on the computer.

'Turn' a folder into a virtual drive on Windows 10 Picture 2

Next, enter the following command in Windows PowerShell:

subst: "Full path of folder"

Where "" is the drive letter you want to use and " Full path of folder " is the full path of the directory you want to mount as the virtual drive. For example, here "Z" will be the drive letter you choose and the directory path you want to mount as a virtual drive is "D: Photos", then we will have the following specific command, do not forget to press ENTER to execute.

subst Z: "D: Photos"

'Turn' a folder into a virtual drive on Windows 10 Picture 3

After running the command, the directory you mount will appear in the drive list with the name of the character you set.

'Turn' a folder into a virtual drive on Windows 10 Picture 4

Delete the mounted virtual drive from the directory

When you want to delete the mounted virtual drive, simply run the command with the syntax:

subst: / d

Where "" is the character name of the mounted virtual drive. For example, here we will delete the virtual drive "X", the complete command will be:

subst X: / d

'Turn' a folder into a virtual drive on Windows 10 Picture 5

And this is the result.

'Turn' a folder into a virtual drive on Windows 10 Picture 6

Set Windows to automatically store a mounted directory task as a virtual drive even when logged out, started, or shutdown

As mentioned above, attaching a folder as a virtual drive is only available at the current session, if you log out, start or shut down the previous mounting task will disappear. Therefore, if you want Windows to automatically store tasks, even when you log out, start or shut down, do the following.

Open Notepad and enter this command

'Turn' a folder into a virtual drive on Windows 10 Picture 7

Proceed with "" replacing the name of the virtual drive letter that you have attached and want to store the operation for. And "Full path of folder" becomes the full path of the folder you mount as the virtual drive. Thus we will get the full command as shown.

'Turn' a folder into a virtual drive on Windows 10 Picture 8

Then, save the file as ".bat".

'Turn' a folder into a virtual drive on Windows 10 Picture 9

Finally, visit the " C: ProgramDataMicrosoftWindowsStart MenuProgramsStartup " path and paste the file saved above into it.

'Turn' a folder into a virtual drive on Windows 10 Picture 10

Very simple, right?

4 ★ | 90 Vote

May be interested

  • How to create a virtual drive on Windows with Simple VHD ManagerHow to create a virtual drive on Windows with Simple VHD Manager
    how to create a virtual drive on windows with simple vhd manager. virtual hard drive (virtual hard drive) is a file that simulates the structure of a drive, helping you save alternative data to the hard drive. a virtual drive can be used to save games, operating systems or anything
  • Here's how to create a Virtual Hard Disk on Windows 10Here's how to create a Virtual Hard Disk on Windows 10
    basically, virtual hard disk (vhd) is a file format that contains the structure of the 'complete' structure of a hard drive. it is understandable that a virtual hard disk is located on an original file system and is 'packaged' in a single file.
  • How to turn off the hard drive after not working in Windows 10How to turn off the hard drive after not working in Windows 10
    installing turn off hard disk after in power options allows the user to set the power to the hard drive (hdd) to be turned off, after detecting it has been inactive for a period of time. this setting will not affect ssd or nvme drives.
  • What is the ProgramData folder on Windows?What is the ProgramData folder on Windows?
    on new versions of windows, you will see a folder named programdata on the system drive (usually a c drive :). however, this folder is hidden, so you can only see the folder if it allows you to display folders and files on file explorer.
  • How to turn off hard drive when not in use on Windows 11How to turn off hard drive when not in use on Windows 11
    if your computer has an ssd and an hdd, you can turn off the hard drive after a period of inactivity. this saves power and can extend the life of the hard drive, especially on laptops.
  • Instructions to delete Windows.old folder on Windows 7/8 / 8.1?Instructions to delete Windows.old folder on Windows 7/8 / 8.1?
    usually after you reinstall windows without deleting the old partition, windows 7/8 / 8.1 will appear a new folder in drive c with the name windows.old. what is that? that is the folder containing all the system files of the old windows version, when not deleted, the system will automatically collect all in one folder and name it windows.old.
  • Instructions for activating virtual machines on Windows 11Instructions for activating virtual machines on Windows 11
    virtual machine on windows 11 will support users to run an operating system other than windows right on your computer.
  • Change directory template in Windows 10Change directory template in Windows 10
    windows 10 includes 5 built-in templates to optimize the drive, folder and library view. this guide will show you how to optimize the drive, folder or library template for general items, documents, pictures, music or videos in windows 10.
  • Detailed instructions for installing Virtual DriveDetailed instructions for installing Virtual Drive
    virtual drive is a software that supports creating virtual drives, helping users run file formats such as iso, nrg, cue easily. this tool is especially useful for gamers, programmers and office workers when working with virtual data.
  • How to move the Download folder to another drive on Windows 11How to move the Download folder to another drive on Windows 11
    moving the download folder from drive c to another drive on windows 11 will help you reduce c drive space and help your computer run smoother.