Multiple files upload

I am trying to automate upload of multiple files in parallel to a webpage from a local drive. Script generated by UI.Vision recorder works just fine for a single file. Unfortunately I am not able to modify it to upload 2 or more files (C:\Data\pic1.jpg, C:\Data\pic2.jpg, …).

I am new to coding / test automation domain and I cannot help myself though I have spent few evenings with this. Can anybody help please?

json generated by recorder:

{
  "Command": "click",
  "Target": "xpath=//*[@id=\"dropzoneods\"]/a/span",
  "Value": "",
  "Targets": [
    "xpath=//*[@id=\"dropzoneods\"]/a/span",
    "xpath=//a/span",
    "css=#dropzoneods > a > span"
  ]
},
{
  "Command": "type",
  "Target": "name=souborp[]",
  "Value": "C:\\Data\\pic1.jpg",
  "Targets": [
    "name=souborp[]",
    "xpath=//*[@id=\"formpridani\"]/table/tbody/tr/td/input[3]",
    "xpath=//input[@name='souborp[]']",
    "xpath=//td/input[3]",
    "css=#formpridani > table > tbody > tr:nth-child(1) > td > input:nth-child(27)"
  ]
},

If it works fine for one file, then you only need to add a loop to go over all files.

Question: How do you know which files to upload? Do you have a list of them (maybe as CSV file), or is the goal to upload all files in a certain folder?

for now, I would be very happy with a hardcoded script for uploading 2 given files C:\Data\pic1.jpg and C:\Data\pic2.jpg.

i have seen couple of posts on how to do it, but none of them works for me. perhaps I am struggling with syntax only or maybe i am expecting too much from macro recorder in chrome (RPA 5.8.8) but the result is that multiple files upload does not wok.

Well, in that case, why dont you simply copy your “one file upload” script? Then you have a two file upload macro! Or does that not work for any reason? If so, a screen video of the running RPA software would be useful.