Python scripts to zip and unzip data |
|
Release 9.2
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.
Label | Data Type | Type | Direction |
Input workspace | Workspace | Required | Input |
Output file | File | Required | Output |
Label | Data Type | Type | Direction |
Input ZIP file | File | Required | Input |
Output Location | Workspace | Required | Input |
Output Name | String | Required | Input |
Output Path | Workspace | Derived | Output |