How to get a command prompt in Windows

People sometimes ask me:
How do I run mp? When I double-click it, a window flashes up and disappears.
The thing you need is the Command Prompt. It's not MS-DOS. These programs are console applications; that doesn't mean they're somehow "not Windows" programs.

In Microsoft Windows:

With the cursor on the desktop, press the right mouse button. From the context menu, choose New, and from the popup, choose Shortcut. This brings up the Create Shortcut dialog.

The command line you want is c:\winnt\system32\cmd.exe. If you're running Windows XP, it's in c:\Windows\system32 (Windows 2000 used the directory name Winnt that reflected its development out of Windows NT). You can type that in the box or click the Browse button and navigate to the file Cmd.exe that is in C:\Winnt\System32. Then click Next. Name the shortcut something like Command Prompt. Click Finish. The shortcut appears on the desktop as an icon.

Now you can use the shortcut as it is, but you might find it convenient to modify its properties slightly. With the pointer over the shortcut's icon, press the right mouse button. Choose Properties from the context menu that appears. The property sheet appears next. Note the tabs along the top.

Click the Shortcut tab. Don't change the Target field, but do change the field labeled Start In. This will be the default directory for any commands entered at this command-prompt window. Enter the full path to a directory that contains your metadata, or to some higher-level directory like C:\. When you're typing commands to the prompt, you can change the working directory by using the cd command just like you used to in the old days of MS-DOS; it's just that now Windows NT is the operating system.

I find it convenient to enlarge the size of the window itself. Click the Layout tab of the property sheet, and find the section marked Window Size. Change the height to 50. To make things even more convenient, find the Screen Buffer section and change the height parameter there to some large number like 500. This makes it so you can use the scroll bar to look at things that have scrolled off the screen.

To change the colors, select the Colors tab. I like my background dark blue rather than black. It doesn't affect any of the programs, but it's an aesthetic choice available to you.

When you've made all of the changes you'd like to make, click Apply and OK (I think if you click OK you don't need to click Apply).

To run programs like cns, mp and dbfmeta, you'll need to start this command-prompt window. Just double-click the icon. It is most convenient to begin by setting your PATH to include the directory that contains the metadata tools. Type this:

C:> PATH %PATH%;c:\USGS\tools\bin

That appends c:\USGS\tools\bin to your existing PATH, so that Windows will look in that folder when you type the name of a program like mp. If you don't do this step, you would have to run mp by typing

C:> c:\USGS\tools\bin\mp ( whatever options you need)

with the PATH set to include c:\USGS\tools\bin, you only have to type

C:> mp (... plus options)

To test it all out, run mp by itself. It should print out a usage message with version number. If instead the system says

  The name specified is not recognized as an internal or external
  command, operable program or batch file.
then check the PATH and make sure it includes the directory where mp.exe is stored. By default the tools install in C:\USGS.

All of this works essentially the same way under Windows 95, 98, and 2000. Under Windows XP it works the same except the windows directory is called "Windows" rather than "WinNT".