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 that is 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

2/10/2014