Folder or Path as a Drive Letter on Windows XP

I was creating a setup of PortableApps on my XP machine with some of the great stuff you can port around in that framework: Open Office, VLC etc. without installing them into the OS. I didn’t have a USB drive with me, and thought hey, maybe I can just make a virtual drive from a folder and load the apps into that (I’ve done this using Cygwin in my development environment).

So I started digging through the commands and found SUBST. It associates a path with a drive letter.

Just open up a command line and type in the following syntax:


subst (virtual drive letter): (actual path)

So, for instance, say I want to mount a folder “\\atlas\shrugged” from a network drive as drive letter “q:” on my local –

subst q: \\atlas\shrugged

And a local folder as “x:” –

subst x: C:\journeyman

Disconnecting the virtual drives is simple enough, use the “/d” flag for delete:

subst x: /d

I haven’t found a ton of use cases for this yet, but it’s a nice little command line tool for any automated tasks you might think of someday.

Funny enough, when I was going through the PortableApps setup it now allows you to install to a folder — as I remember the older versions needed a drive — chuckle. 🙂

Comments are closed.