NextBurgh, PA          @VannevarB      About      Pittsburgh Murals
February 11, 2009

Mapping a Drive Letter to a Folder

Probably several times a day, I need to open a file - an image, some code - that's in a folder on my hard drive. The name of my favorite folder is C:\Inetpub\wwwroot .

So let me point out that I'm conflicted about punctuation in close proximity to URLs or IP addresses at the end of a published sentence. It's too easy to have the period at the grammatical endOfSentence misunderstood as part of the URL or IP address. I'm not the only one who's recognized this tension inherent in our system.

Several times a day, when I need to open a website file, it's Open, File, Pick the C: drive, pick Inetpub, pick WWWROOT, and then proceed. Wouldn't it be cool to be able to map C:\Inetpub\wwwroot as the W:\ drive (for Web)?

You may recognize that folder as the "localhost" for an IIS web server, which is equivalent to IP address 127.0.0.1, which brings us to this geek pun at the right:


I'm in Windows XP Pro, because I need to run IIS and the thought of Vista makes me want to cry. It seems like this virtual mapping is not that difficult a trick to accomplish. From a command prompt, you enter
    SUBST W: C:\inetpub\wwwroot (enter)

The command to delete the substitution is:
    SUBST w: /D (enter)

To find out what substitutions are in effect, type:
    SUBST (enter)

Caveat 1: When you reboot, the substitution is lost. Go to your C:/ drive and find autoexec.bat, and add the SUBST command there. Then save that file in your C:\Documents and Settings\All Users\Start Menu\Programs\Startup folder. It amazes me that all these years after DOS "went away", we're still fooling with autoexec.bat files. That noise in the distance are voices chanting, "wouldn't have to do that if you had a Mac".

Caveat2: if you delete a file by referring to the virtual drive, it does not go to the recycling bin; it's just gone.

A tweak like this is one of the little things that makes a geek very happy.

Another geek sidebar- isn't it amazing that even after Windows 95 "did away with" DOS, when you want to do something with a WinTel computer you still use DOS commands? Is it possible they were disingenuous about this?

0 comments:

Post a Comment

Comments and Feedback? Love that stuff. Please leave your thoughts in the box below--