Here’s a trick which allows you to use any folder as a drive in Windows. This trick comes very handy when you use a particular folder often, and want to quickly access it like in Command Prompt. It actually adds a new drive in My Computer with your specified drive letter(whatever you specify) and that drive actually points to your designated folder. Once you open the drive, you can access the folder.
The DOS command SUBST is used to create a virtual drive allowing you to add any file path and used as a drive.
SUBST [drive1: [drive2:]path]
drive1: Specifies a virtual drive to which you want to assign a path.
drive2: Specifies a physical drive and path you want to assign to a virtual drive.
For example, to create a virtual drive with a specified path:
- Find a folder you want to use as a drive and remember its path. For demonstration i will be using ‘H:sid’ as the path.
- Open Command Prompt and type “subst drive-letter path”
- For example, type “subst z: H:sid” and press Enter.
Now you can easily access that folder by just typing z:
Removing the Virtual Drive:
To remove the virtual drive, go to Command Prompt, and type subst z: /D.
/D Deletes a substituted virtual drive.