I get the file with the wait for download acitivty. Which gives me the path in a fileinfo format. However the Send E-Mail acitivity expects an IEnumerable(ofIrecource).
Hi @ashokkarale, I actually have to attach multiple files, will it work as well? Also I do not know the file name, it has to be the latest file which was downloaded
@VLC
I tried the scenario you mentioned and was able to figure it out.
Please check the solution in the attached screenshot to attach multiple files from a folder in a dynamic way. Kindly mark it as a solution if it meets your request.
@VLC Please mark the response that clarified your Query as solution to close this conversation.
This will help us to stay engaged with more community questions.
yes I haved used that way to run the process on my local PC for testing. However I am not sure that it will work om the virtual machine when I put it into the orechstrator.
Furthermore since I added the send E-Mail activity I get the following notification:
However for the Send E-Mail activity I dont have a solution yet.
Manas has put the expression directly into the send E-Mail activity. Cant I use the same expression two times, once with “first” at the end and once with “second”?
This expression will give you all the files there in the specific folder
ienumFiles = Directory.GetFiles("your\folder\path").OrderByDescending(Function(f) File.GetCreationTime(f))
datatype of ienumFiles should be IEnumerable(Of String)
If you want all the files from that list to be attached, pass this expression in the attachments
Hi Ashok, I am sure your answer is the solution. Its just to advanced for me. I am unable to put the variable to the datatype IEnumerable(of String) I can only find IEnumerable without string. Maybe thats the reason why UiPath has an issue with “select”