Export Attachments (Data Management Tools)
Summary
Exports file attachments from the records of a geodatabase feature class or table to a specified folder. Attachments can also be exported to subdirectories based on an attribute value from a specified attribute column. Exported attachments can be renamed using one or more field attribute values.
Learn more about working with the Attachments geoprocessing tools
Usage
This tool honors selections. If no records are selected, all attachments will be exported.
Exported attachment files will be the same file type as when added to the geodatabase. For example, if the attachment is a
.pdffile, the exported file will be a.pdf.Attachments can be exported to subdirectories for each record by specifying a value for the Subdirectory Field parameter. Values from the field will be used to name the subdirectories. For example, if the attribute table has three rows, and the values of the selected field are ATL, TPA, and SLC, three subdirectories with these names will be created. All attachments for each of these values will be downloaded into their respective subdirectory.
To avoid name conflicts in the exported files, the tool will add an incremental number to file names when appropriate. If a field value is null, the word
Noneis used in the file name.When exporting attachments, the following characters from field values will be replaced in the output subdirectories and file names:
Field value characters
Replaced with
Forward slash (/)
Hyphen (-)
Double backslash (\\)
Hyphen (-)
Pipe or vertical Line (|)
Hyphen (-)
Asterisk (*)
Underscore (_)
Less than (<)
Underscore (_)
Greater than (>)
Underscore (_)
Question mark (?)
Underscore (_)
Colon (:)
A comma followed by a space (, )
Parameters
| Label | Explanation | Data type |
|---|---|---|
|
Input Dataset |
The geodatabase table or feature class from which attachments will be exported. The input must be stored in a version 10.0 or later geodatabase, and the table must have attachments enabled. |
Table View |
|
Output Location |
The folder where the attachment files will be exported. |
Folder |
|
Subdirectory Field (Optional) |
A field from the Input Dataset parameter value that will be used to create subdirectory names. |
Field |
|
Name Format (Optional) |
Specifies the format that will be used for naming exported attachments.
|
String |
|
Name Fields (Optional) |
The field names from the Input Dataset parameter value that will be used to rename the exported attachments. If multiple fields are specified, the output files will use the field values concatenated with an underscore in the order they are specified. For example, if two field names are specified, and Name Format parameter is set to Use Field Values Only, the field values for the first record are This parameter is enabled when the Name Format parameter is set to Use Field Values Only, Add Field Values as Prefix, or Add Field Values as Suffix. |
Field |
Derived output
| Label | Explanation | Data type |
|---|---|---|
|
Output Directories |
The updated folders. |
Folder |
Environments
This tool does not use any geoprocessing environments.
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes