ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Create File GDB

  • Summary
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Creates a file geodatabase in a folder.

Usage

Syntax

CreateFileGDB_management (out_folder_path, out_name, {out_version})
ParameterExplanationData Type
out_folder_path

The location (folder) where the file geodatabase will be created.

Folder
out_name

The name of the file geodatabase to be created.

String
out_version
(Optional)

The ArcGIS version for the geodatabase to be created.

  • CURRENT —Creates a geodatabase compatible with the currently installed version of ArcGIS
  • 10.0 —Creates a geodatabase compatible with ArcGIS version 10
  • 9.3 —Creates a geodatabase compatible with ArcGIS version 9.3
  • 9.2 —Creates a geodatabase compatible with ArcGIS version 9.2
String

Code sample

CreateFileGDB Example (Python Window)

The following Python Window script demonstrates how to use the CreateFileGDB function in immediate mode.

import arcpy
from arcpy import env

arcpy.CreateFileGDB_management("C:/output", "fGDB.gdb")
CreateFileGDB Example 2 (Python Window)

The following Python Window script demonstrates how to use the CreateFileGDB function in immediate mode to create a file geodatabase corresponding to a previous release of ArcGIS with the optional File GDB version parameter.

import arcpy
from arcpy import env

arcpy.CreateFileGDB_management("C:/output", "fGDB.gdb", "9.2")
CreateFileGDB Example 3 (Stand-alone Python Script)

The following Python script demonstrates how to use the CreateFileGDB function in a stand-alone script.

# Name: CreateFileGDB_Example2.py
# Description: Create a file GDB

# Import system modules
import arcpy

# Set local variables
out_folder_path = "C:/output" 
out_name = "fGDB.gdb"

# Execute CreateFileGDB
arcpy.CreateFileGDB_management(out_folder_path, out_name)

Environments

  • Current Workspace
  • Scratch Workspace

Licensing information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • An overview of the Workspace toolset
  • Types of geodatabases
  • What is a file geodatabase?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal