ArcGIS banner

Using the command line window to create a file geodatabase

Geoprocessing

Segment 2 of 16

Top  Previous  Next

The Command Line window consists of a command line and a message section. All tools added to the ArcToolbox window can be executed from the command line as well as from their dialog boxes. The command line provides a quick way to execute tools if you are familiar with their parameters.

You’ll now see how to create a file geodatabase (Temp_Results.gdb) by running a tool at the command line. This file geodatabase will hold intermediate data that you’ll create to produce the final result. Results you want to keep will be placed inside the existing geodatabase, Habitat_Analysis.gdb.

To do so, click Show/Hide Command Line Window on the Standard toolbar to open the window. As with the ArcToolbox window, the Command Line window can be docked anywhere inside any ArcGIS Desktop application.

The Command Line window contains a prompt (a command line) where you can run tools and a message window, showing all the messages associated with running tools—at the command line, through a tool’s dialog box, by running a model from within a ModelBuilder window or any messages returned after running a standalone script.

AutoComplete enables you to type part of the tool name until you see the name of the tool displayed in the dropdown list. You can then press the Space key to automatically complete the rest of the tool name. Once the tool name is entered, the tool’s usage appears as a ToolTip. It prompts you for the next parameter value that must be specified by highlighting the parameter in bold.

Type “CreateFileGDB”, then press the Space key. Note: The Data Management Tools toolbox must be added to the ArcToolbox window to run tools from this toolbox at the command line. If the toolbox is not added, right-click the ArcToolbox window and click Add Toolbox. Navigate to the Toolboxes folder at the root level of the ArcCatalog tree and locate the Data Management Tools toolbox, then add it to the ArcToolbox window.

Type “C:\GP_Tutorial”, or your alternative drive, for the value of the parameter, then type a space.

Type “Temp_Results.gdb” for the value of the parameter. This is the file geodatabase to create inside your GP_Tutorial folder.

Press Enter to run the CreateFileGDB tool. A new personal geodatabase called Temp_Results.gdb is placed in your GP_Tutorial folder.

As with the ArcToolbox window, the Command Line window can be docked anywhere inside any ArcGIS Desktop application. To dock the window at the bottom of an ArcGIS application window, press and hold the Ctrl key while you click and drag the bar at the top of the Command Line window and position it at the lower-left corner of your application. Holding the Ctrl key prevents the window from docking to the application. Release the Ctrl key and drop the panel.


Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.