Hello,
I want to make an automatic process in which it sends an email with a pdf attached with the “Send SMPT Mail Message” activity.
The robot downloads a pdf and saves it in a folder with a specific name and the current date (now.toString). How do I select the pdf I want to send if there are more pdfs in the folder. The bot would be launched once a day and the selectable file would be the one downloaded at that very moment.
Hey!
It could be helpful us to provide the FileName how we’re storing?
Example:
ABC_Now.ToString("dd.MM.yyyy").PDF
SOLUTION:
Assign strFolderPath = Desktop\InputFolderPath\
Assign arrFiles = Directory.GetFiles(strFolderPath,"*.pdf")
Take one For each pass the arrFiles
Now Use one If Condition Pass the Expression Like this
Item.Contains(Now.ToString("dd.MM.yyyy"))
In then block you’ll get the Today’s Pdf Files
In else block you’ll get other than today’s Pdf Files
Try this and let me know
Regards,
NaNi
The path of where it is saved and the name of the file is as follows:
“”“C:\Users\admin\Documents\MercanciasLactia " & now.ToString(“ddMMyyyy”) & “_DocumentoPreparaciónMercancias””"