Export Attachments (Data Management)

ArcGIS Pro 3.4 | | Help archive

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 .pdf file, 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 None is 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 charactersReplaced 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

LabelExplanationData 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.

  • Use Original FilenamesThe output file names will use the original file names stored in the geodatabase.
  • Use Field Values OnlyThe output file names will use the field values of the Name Fields parameter values. Multiple values will be concatenated with an underscore.
  • Add Field Values as PrefixThe output file names will use the original file names with a prefix from the field values of the Name Fields parameter values.
  • Add Field Values as SuffixThe output file names will use the original file names with a suffix from the field values of the Name Fields parameter values. Multiple values will be concatenated with an underscore.
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 Main and Street, and the attachment is a .jpg file, the exported file will be named Main_Street.jpg.

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

LabelExplanationData Type
Output Directories

The updated folders.

Folder

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics