Friday, August 10, 2007

How to open a command prompt window?

The command prompt window is the terminal window where you can enter commands and see responses. You'll find a link to the command prompt window somewhere in the Start menu in the Accessories folder. You can directly access the command prompt window running "cmd". For this click on "Start" and "Run...". Windows prompts you for the program to open. Enter "cmd". This opens a new command prompt window with the white letters and the black background. You see the prompt which shows the current directory in which you are at the moment.

Sometimes it is helpful to post the output of some command in the internet or a forum. You can redirect the output of any command to a file. The biggest obstacle is usually to find the file where you have saved it afterwards. When I open a command prompt window, the prompt shows that I am in the top directory of my windows profile folder which is C:\Documents and Settings\gv. If you enter "cd Desktop" into the command prompt window you'll change into the folder which contains everything which is on your desktop. This is a good place to save the output of a command to as you can quickly find it on the desktop.

To redirect the output of a command, e.g. of ipconfig /all you enter:

C:\Doc...\gv\Desktop> ipconfig /all > ipconfig1.txt

This writes the output of ipconfig into the file ipconfig1.txt on your desktop. There you can open it with notepad to copy the contents into your web browser. You could also enter "notepad ipconfig1.txt" to open the file with notepad. If you need several outputs from different commands just vary the filename.

No comments: