Create Folder (Data Management) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Tools" |
Creates a folder at the output location.
Usage tips
The Output folder should not already exist. An error will not occur if the folder already exists.
The environment settings do not have an effect on this tool.
The following environment settings affect this tool: workspace and scratch workspace.
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 |
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 |
# 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()