Uploading multiple files from a folder to a website one by one

I have a folder with say 10 files, the website is only able to upload one file at a time, so each time I have to loop (with other activities like deleting the previous file, all done with selectors) to upload the next one. So I have the Array of Strings with Directory.GetFiles, and the Selector activities are working. Only thing I can’t figure out is how to use the For Each with the array that I got. I’m only just learning UiPath, help would be appreciated. Thanks!

Hi @daqc

Could you share me your xaml possible or screen shot Of your xaml?

Regards

1 Like

The xaml is quite long and have some sensitive information. But the relevant part is basically just empty because i don’t know what to do:


2

Getfiles has the folder path and the file type, fileArray is an Array of Strings.

You have to enter your array variable name (filesArray) in below highlighted place,

Are you facing any issue in that?

2 Likes

Hi @daqc

Please pass the array variable inside for each loop!

And pass item inside the type into!

Regards

1 Like

I just figured it out by fiddling and reading some. I put the filesArray in For Each like you said, then just did toString to pass the path into the upload field. Can’t test the whole sequence for now but the loop works now. Thanks for the replies!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.