Command Prompt is a program that takes the place of visual navigation through the graphical user interface (GUI) on your computer. It enables you to run programs using specific paramaters.
Basic Use
When using Command Prompt, you type in a 'command' and press enter. The computer then does whatever you told it to -
File Navigation
Command Prompt works like a car that you can drive from place to place. There are two ways to drive - up and down. Here is how to go up:
cd..
Lesson One: File Navigation
In order to run programs on Command Prompt, you first have to navigate to the folder that contains your programs. Here we will show you how.
- Open Command Prompt - it should be under "Accesories" in the start menu.
- You should see something like this:
C:\Documents and Settings\Desktop>
- This is your current position in the file hierarchy. To navigate up, type
cd..
and then press enter. You should see something like C:\Documents and Settings>
- To navigate down, type
dir
and then press enter. A readout will appear, showing all of the files and folders that you have in your desktop. To navigate down into My Documents, type cd Desktop
, press enter, then type cd My Documents
and press enter. You should see something like this: C:\Documents and Settings\Desktop\My Documents>
- Now, we can open a document! Type
dir
again. Pick a file from the list, and enter its name into the command line. Press enter.
If we did it all right, your chosen document should open! Yaaaaay!
Lesson Two: Command Line Flags
In this lesson, we learn how to run programs from the COMP *GEO project. Using your techniques from lesson one, navigate your Command Prompt line into a folder that contains
sp_viewer
and an Ottawa data file, in this case, 147.spb.
- Once you have navigated to the corret folder, type
sp_viewer
- Now, instead of pressing enter, we are going to give the program some information about what we want it to do. In this case we will give it some input, which we do by typing
-i 147.spb
.
- Now press enter. If you did it correctly, sp_viewer will open. Press 'p' to activate the graphics.
What did we just do?
The
-i
you typed is specific to each program. It's known as a
flag, and comes before information regarding the program. In this case, the
-i
stood for "input file" and directly preceded the name of the file we used, "147.spb". In some cases, the flag itself is the information, as in spfinalize, where the
--
ChristianStith - 29 Jul 2008
to top