How to use a virtual drive to save time and energy when programming
by Kiyote Wolf
Your mileage may vary – only tested on Windows XP.
- 1) First off, either click Start and then click "Run..", or press Windows + R (Windows key held down, then R key).
- 2) One you see the Open:[__________] box, in that blank space, type cmd.
- 3) Now, follow what this text only screen capture shows us.
Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\Administrator>cd sendto C:\Documents and Settings\Administrator\SendTo>explorer . C:\Documents and Settings\Administrator\SendTo>
(Note: there was a space and a period (“ .”) after the word explorer for those of you that might've missed it.)
Once you typed in those commands, you should have seen a window pop up titled “SendTo”.
- 4) Now, follow a similar start as before: open RUN, with CMD, and do this:
Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\Administrator>cd %temp% C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp>copy con makedrv.bat @echo off if exist p:*.* subst /d p: subst p: %1 echo %1 mapped to P: pause exit
Now, press F6, then <enter>.
^Z 1 file(s) copied. C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp>explorer . C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp>
As before, make sure there is a space and period after the word “explorer”! (The period means “our current directory”)
- 5) Now, look for "makedrv.bat" in the window named Temp, your computer's actual Temporary directory.
Make a SHORTCUT by right clicking it.
Copy that shortcut and paste it to the SENDTO window.
Rename it "Make P: Drive", but don't change the extension from *.LNK to anything else.
If your system is set up so you can change the extensions, don't change it from an *.LNK file.
- 6) Now, close all that out.
- 7) Go to a regular browser explore window. Right click and go to SENDTO. Choose “MAKE DRIVE P:” for any folder. Folders ONLY.
- 8) Now, you should see a console window pop up, wait for a keypress (press a key), and then disappear again.
- 9) Look at MY COMPUTER now.
If you have done all this like it should be done, you should now see a P: drive among your list of other drives.
Why is this useful? Well, a lot of programs forget the "last folder recently used" after you close them, and it's really quite annoying!
Even more useful: if you have an older program, if you don't want to navigate 8.3 filename obscufied pathnames (think of “Documents and Settings” becoming “Docume~1”) you can use EXPLORER to let you navigate the directory tree, then right click on the FOLDER you want to make the drive into.
Don't click on files, and use this SENDTO on them. Right click on a folder, SENDTO with MAKE P: DRIVE, and the folder will become the root of the P: drive.
Each time you right-click and create a new P: drive, it will deallocate the P: drive, then reassign itself; no issue at all with that.
This is a batch file we have created. Using a desktop shortcut link to talk to it first lets us use the redirection of data to make it even more useful.
I use this REGULARLY. I hope that all of you can make use of this, and understand just what exact keystrokes you need to add it to your own computer.
Please watch carefully, as you type this in yourself!
I frequently visit the forum. If you have any problem swith this tutorial, make a thread about this if you would like further notes and DIY how-tos to get this working.