Attaching multiple PDFs

Fairly new to UiPath and looking for the best approach to select multiple files in a local directory to be attached to be uploaded via a website attachment button. These files are all PDF’s and each contains a series of matching numbers in the file name. Running a for each that captures a new set of numbers from a spreadsheet to be pinned against a folder for each to find the matching files to be attached (there should be 2 corresponding .PDFs each time).

Having some issues trying to find the right activity to select and attach when given a variable with the numbers to look for. Any advice?

Hi!

How is the website functionality, can you upload multiple files at once?

Sorry, that was not what you were looking for :slight_smile:

You could check if the filename contains the numbers you look for using String.Contains?
Could you supply the pattern for the filename?

So using the String.Contains is the plan, but I think I have a different issue that requires a much simpler solution.

I am not familiar with an activity I can input into my folder for each that will single out the file that matches and select it for upload. Another way to pose my question is to say “I don’t know how to actually selecting the file once a match is found without select a literal file”.

You just need to store the filepath for the file(s) that you’ve matched in a variable.
You could either do with a List(Of String), or in a Datatable.

Then when it’s time to upload you just write the filepath(s) to the website upload-thingy.
I assume you get something like this when you want to upload something:
image