Python scripts to zip and unzip data
Last modified November 9, 2007
Print all topics in : "Sharing tools on an ArcGIS Server"
The topic Considerations for authoring and publishing models discusses the use of File data types for input and output parameters in tools published to ArcGIS Server. A technique you can use for folder-based workspaces (file geodatabase, coverages, and shapefiles) is to use the Zip compression utility to make a .zip file out of a workspace, then use the result .zip file as input to the model. Within the model, you can use the unzip script (see below) to unzip the file into a workspace, and proceed from there. The same is true for outputs—you can create a .zip file of a workspace and use that for output.
Below are links to two Python scripts, zip.py and unzip.py.
|Input ZIP file||File||Required||Input|