TIP – ADD Virtual drive on Windows

A situation has emerged where I wanted to test the code, but it requires drive letter T which was not available on my machine.

I do not want to directly test the code on the production server.

On researching I have found that there a native feature in windows operating system where you can map any folder as drive.

So here are the simple steps to achieve it:

      1. Create a folder that you want show as drive


     2. Open Command prompt and enter below command (RUN as administrator)

subst T: C:\Tdrive\

     3. Here you go, you can now see the drive letter.


If you want to remove the drive, then the command is:

subst T: /D

I hope this TIP will assist you if you just want a virtual drive mapped out from a folder.

Note: This is not persistent and will disappear after the reboot.



Thanks for reading…………

Tech Wizard




PowerShell Fast Track



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s