Scratch Folder

The scratch folder is the location of a folder you can use to write file-based data, such as shapefiles, text files, and layer files. It is a read-only environment managed by ArcGIS.

The scratch folder environment complements the Scratch Workspace environment. Its primary purpose is for use by scripts and models as geoprocessing services, with the added focus of pointing only to a known folder. When ArcGIS for Server executes a geoprocessing task, the scratch folder is always available to write output to. This environment is also useful in authoring scripts and models for use on the desktop. Writing output to the scratch folder will make your tool portable, because this location will always be available or created at execution time.

Usage notes

Dialog syntax

NoteNote:

The scratch folder environment is only available in Python and models.

Scripting syntax

arcpy.env.scratchFolder

Script example

import arcpy
arcpy.env.scratchWorkspace = "c:/LandUse/ForestCover"

# c:\LandUse\ForestCover\scratch
print arcpy.env.scratchFolder

Related Topics

3/3/2014