Label | Explanation | Data Type |
Folder Location | The disk location where the folder is created. | Folder |
Folder Name | The folder to be created. | String |
Derived Output
Label | Explanation | Data Type |
Output Folder | The new output folder | Folder |
Creates a folder in the specified location.
The output folder name must be unique.
Label | Explanation | Data Type |
Folder Location | The disk location where the folder is created. | Folder |
Folder Name | The folder to be created. | String |
Label | Explanation | Data Type |
Output Folder | The new output folder | Folder |
arcpy.management.CreateFolder(out_folder_path, out_name)
Name | Explanation | Data Type |
out_folder_path | The disk location where the folder is created. | Folder |
out_name | The folder to be created. | String |
Name | Explanation | Data Type |
out_folder | The new output folder | Folder |
The following Python window script demonstrates how to use the CreateFolder function in immediate mode.
import arcpy
arcpy.CreateFolder_management("C:/output", "folder1")
The following Python script demonstrates how to use the CreateFolder function in a stand-alone script.
# Name: CreateFolder_Example2.py
# Description: Create a folder
# Import system modules
import arcpy
# Set local variables
out_folder_path = "C:/output"
out_name = "folder1"
# Execute CreateFolder
arcpy.CreateFolder_management(out_folder_path, out_name)