Summary
Iterates over workspaces in a folder.
Usage
This tool is intended for use in ModelBuilder and not in Python scripting.
Iterate workspace can be limited to iterate over workspace types such as Access, Coverage, File Geodatabase, Folder, or SDE.
The tool has two outputs: Output Workspace and Name which could be used as in-line variables %Name% in other tools.
If an Iterator is added to a model, all tools in the model iterate for each value in the iterator. If you do not want to run each tool in the model for each iterated value, create a sub-model/model within a model/nested model that contains only the iterator and add it as a model tool into the main model.
Syntax
arcpy.mb.IterateWorkspaces(in_folder, {wildcard}, {workspace_type}, {recursive})
Parameter | Explanation | Data Type |
in_folder | Folder which stores the workspace to iterate. | Folder |
wildcard (Optional) | Combination of * and characters that help to limit the results. The asterisk is the same as saying ALL. If no wildcard is specified, all inputs will be returned. For example, it can be used to restrict Iteration over input names starting with a certain character or word (e.g., A* or Ari* or Land*,and so on). | String |
workspace_type (Optional) | Choose the Workspace Type, such as Access, Coverage, File Geodatabase, Folder, or SDE.
| String |
recursive (Optional) | Determines if subfolders in the main folder will be iterated through recursively.
| Boolean |
Environments
This tool does not use any geoprocessing environments.
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes