I have a script I am running in ArcGIS Pro that downloads a file geodatabase of a feature class and saves attachments as JPEGs from the FGDB. The original feature class often has multiple attachments for each record, and sometimes multiple records for each 'site.' I need all of these attachments to save separately.
My script currently overwrites the previous attachment with the latest one. I need it to save a new attachment with "--2" or "--3" at the end of each subsequent attachment. So a site with one recrod that has 2 attachments would have two JPEGs saved: "SiteNumber.jpg" and "SiteNumber--2.jpg".