Phil for Humanity Phil for Humanity
A Guide for the Survival of Humankind and Helping the World, Society, and Yourself.



Windows Support: Opening a DOS Prompt


If you are like me (lazy), then you are probably tired of manually opening a Windows Command Prompt to get into DOS, and then having to always immediately change partitions and directories. I think the standard default starting location is C:\, and it is very seldom that I want to work in the directory.

So, I created this simple Batch script to open a DOS Command Prompt into the correct directory of my projects. Here is how to do it.

First, create a text file with a bat extension instead of txt.


Second, copy these three lines of code to the file, and nothing else in the file. Make sure to change the first two lines. The first line is the partition that you want to work in. The second line is the directory that you want to work in.

Otherwise, if you want to run the same commands in a single command, you can use this command. The problem that could happen is if the directory path has spaces in it so be careful.



by Phil for Humanity
on 20110128

Related Articles
 » The Problems with the Batch Programming Language
 » Command Loop
 » Windows Support: Finding Hostname from an IP Address