Hi,
I have 3 different folders with multiple files, I need to attach all the files from 3 different folder to SMTP attachments, how do we do it ? please advise
Hi,
I have 3 different folders with multiple files, I need to attach all the files from 3 different folder to SMTP attachments, how do we do it ? please advise
Store all the file path in a collection variable and pass the Variable to the Attachment collection option in the Properties.
Check the below image for better understanding,
The collection variable should be IEnumerable of String datatype,
Hope it helps!!
Directory.GetFiles("YourFolderpath",".*yourExtension")
folder1Files=Directory.GetFiles("C:\Users\rlgandu\Downloads\PDF FILES").ToList()
folder2Files=Directory.GetFiles("C:\Users\rlgandu\Downloads\Sample_Test").ToList()
allFiles=folder1Files.Concat(folder2Files)
If you want to give three folders then use this to concat
allFiles =folder1Files.Concat(folder2Files).Concat(folder3Files).ToList()
Thank you, solves the issue @rlgandu
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.