CIT041X Index > Using the Command Prompt

Using the Command Prompt

We will be using the command prompt to run programs for testing and creating XML. This may be new to those of you who have used only point-and-click graphic interfaces in Windows. All of this will be old news to those of you who have used Unix or Linux.

To get a command prompt on a Windows 2000 system, from the Start menu, go to Programs, then Accessories. You will find Command Prompt in the resulting menu. For Windows NT systems, from the Start menu, go to Programs, and you will find Command Prompt in the resulting menu.

A small window will open; it will have a black background and white text, and you will see a prompt that looks like this:

C: >

The C: is the disk drive name. If you want to see a list of the files in your directory, type this after the prompt, and press ENTER:


We won’t go into a long list of all the commands that you can type at this prompt. The important part is that you can create batch files that perform certain commands for you, and those are the ones you’ll type in.

Sometimes you’ll need to repeat a command (in case your first effort at an assignment doesn’t work). You can either retype it completely, or you can simply press the up arrow key on your keyboard to bring back the last command.

Even though an editor is available from the command prompt, you probably don’t want to use it—it’s really a crude editor. Instead, you’ll open up another editor window using notepad or TextPad (a far superior editor) and do your typing there. The general flow of your work will go something like this:

  1. Edit your XML file(s) in TextPad.
  2. Bring the command prompt window to the front and type the appropriate commands to test/transform/etc. your files.
  3. If it all works, you’re finished.
  4. If not, return to step 1.

A note to Linux/Unix people who are working with Windows for the first time: path names are separated by backslashes (\) rather than forward slashes (/). If you have a series of paths, they are separated by semicolons rather than colons.