Attachments (photos) ar needed to go in dokumentation outside ArcGIS. It would be good to sort and identify them easily, but the filename is quite a long number and there is no EXIF information. Therefore I would like to set a style for the atachment file-name like jjmmddhhmm. Is there a way to do that?
I had to get the time stamp of some photos a while ago.
I used python os.stat.
It would be fairly easy to modify this code to rename the photo file..
My original just wrote out to text.
for fname in flist: for ext in extension: if fname.endswith(ext): f = os.path.join(impath, fname) st = os.stat(f) dt = time.strftime('%d/%m/%Y %H:%M:%S', time.localtime(st)) outstr = fname + ' ' + dt + '\n' outfd.write(outstr) outfd.close()
Unfortunately, you cannot do this directly in Collector (this needs to change). You can, however, follow some steps to rename attachments in ArcMap after you've downloaded the data.
1) Bring features and related attachment table into ArcMap
2) Join the attachment table to the features using the GLOBALID and REL_GLOBALID fields
3) Now you can re-calculate the the ATT_NAME to whatever field value you have in your features table (an ID for example, or date/time, etc.). Make sure to add ".jpg" or whatever image extension you use so they export correctly.
4) Then batch export attachments from the feature class
It will export all attachments in the attachment table to a specified folder location given the ATT_NAME + extension you use....for example: 12345.jpg
As part of the upcoming Collector 10.4 release we will be maintaining EXIF information for photos added via Collector. Realize this isn't the only aspect you're interested in or have commented on, but wanted to alert you to this upcoming change.