ArcGIS Desktop

  • Documentation
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

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
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Create Folder

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

Summary

Creates a folder in the specified location.

Usage

  • The output folder name must be unique.

Syntax

CreateFolder_management (out_folder_path, out_name)
ParameterExplanationData Type
out_folder_path

The disk location where the folder is created.

Folder
out_name

The folder to be created.

String

Derived Output

NameExplanationData Type
out_folder

Code sample

CreateFolder Example (Python Window)

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

import arcpy
from arcpy import env

arcpy.CreateFolder_management("C:/output", "folder1")
CreateFolder Example 2 (Stand-alone Python Script)

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

# Name: CreateFolder_Example2.py
# Description: Create a folder
# Author: ESRI

# Import system modules
import arcpy
from arcpy import env

# Set workspace
env.workspace = "C:/data"

# Set local variables
out_folder_path = "C:/output" 
out_name = "folder1"

# Execute CreateFolder
arcpy.CreateFolder_management(out_folder_path, out_name)

Environments

  • Current Workspace
  • Scratch Workspace

Licensing information

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

Related topics

  • An overview of the Workspace toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

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

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2019 Esri. | Privacy | Legal