Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Data Management toolbox > Workspace toolset > Tools

Create Folder (Data Management)

Release 9.2
Last modified November 29, 2010
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

Creates a folder at the output location.


Usage tips

Command line syntax
An overview of the Command Line window
CreateFolder_management <out_folder_path> <out_name>

Parameter Explanation Data Type
<out_folder_path>

The existing location where the folder will be created.

Folder
<out_name>

The folder to be created.

String
Data types for geoprocessing tool parameters


Command line example

CreateFolder e:\arcgis\arctutor tests

Scripting syntax
About getting started with writing geoprocessing scripts
CreateFolder_management (out_folder_path, out_name)

Parameter Explanation Data Type
out_folder_path (Required)

The existing location where the folder will be created.

Folder
out_name (Required)

The folder to be created.

String

Data types for geoprocessing tool parameters


Script example

# create.py
# Creates a folder, personal geodatabase and feature dataset
# Create the Geoprocessor object
import arcgisscripting, sys, string, os
gp = arcgisscripting.create()

# Local variables...
output_location = "C:/project93"
output_folder = "data"
output_gdb_location = output_location + "/" + output_folder
personal_gdb = "montgomery.mdb"
output_personal_gdb = output_gdb_location + "/" + personal_gdb
output_feature_dataset = "water"

try:
    # Process: Create Spatial Reference...
    template = "c:/arcgis/arctutor/buildingageodatabase/Montgomery.mdb/Landbase/parcels"
    sr = gp.CreateSpatialReference_management("#", template, "", "", "", "", "0")

    # Process: Create Folder...
    gp.CreateFolder_management(output_location, output_folder)
    gp.refreshcatalog(output_location)

    # Process: Create Personal GDB...
    gp.CreatePersonalGDB_management(output_gdb_location, personal_gdb )
    gp.refreshcatalog(output_personal_gdb)

    # Process: Create Feature Dataset...
    gp.CreateFeatureDataset_management(output_personal_gdb, output_feature_dataset, sr)

except:
    # If an error occurred while running a tool print the messages
    print gp.GetMessages()

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