Survey123 export images into separate folders

316
1
11-20-2023 02:24 AM
MRomijn
New Contributor

Hi everyone, I have created a survey to capture records to onboard individuals to a project. The project is across 20 different locations and the project site location is one of the fields in the database. There are almost 4000 entries. Each entry has 3 to 4 images/files linked to it, which include a photo of the person, photo of their identification and bank letter. I have coded the images to save with each participants identification number, their surname and the "name" of the image/file. About 5% of the attachments did not name correctly.

I have exported all the entries using this link: Survey123 Tricks of the Trade: Download survey data (with attachments)  https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-download-survey-da... 

However it places all the attachments into one folder. With over 4000 entries it becomes difficult to sort the data and place it into the relevant project site. Does anyone know of a way that you can export the attachments either simultaneously into different folders (per project site), or to export the attachments in batches per project site.  

0 Kudos
1 Reply
DougBrowning
MVP Esteemed Contributor

If you try my code further down the post you listed it can do it by field to a folder.

baseOut = outDir + "\\" + row[5] + "\\" + row[2]

Hope that helps