Search for file using name found in loop

Hello,

I am trying to make a feature where after an excel file has been loop through, it will look for the file with the same name.

So for example at the end of the loop, the bot found these file names. How would I go about to find these files that are in the same directory as the excel file?
image

Thanks

To add on, after finding the files I will have to attach it to an email.

Can the files that were found be stored in something such as a variable or array? Thanks

@SRoyi

You can use for each file in folder activity with a filter and give each file name in loop

or use directory.Getfiles("Folderpath","Name*") - this gives an array of files which satisfy the condition that is filename contains Name in this case

and yes instead of adding comma separated you can add the values to array also… or if these are the only files in that folder then you can just use for each file in folder with out filter and directory.getfiles also without filter

cheers

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