Is there a way to select the most recent file in a directory and e-mail that file? My goal is to create a file daily, save a copy with name_date, and e-mail that file to coworkers.
I've been able to read into a workflow the most recent file, as well as create a workflow that e-mails an output, just looking to put the two together.
Thanks,
Jon
Solved! Go to Solution.
Hi @Jon_ct,
when adding an attachment in the E-Mail tool you can select "File name from field value". Choose the right field and that's it!
Best
Alex
I would use the Directory Tool to get a list of files in the folder, sort by Creation Date descending, Sample tool -> to keep 1st record only and use the fullpath as the filename field in your email tool.
@DavidP Thanks, I was able to get this to work!
If i wanted to send two files from two different folders (both the most recently created files) in one e-mail is there a way to do that?
Hi @DavidP,
Can you send me a sample workflow using the Directory Tool and how can I add the latest file in the email tool. Thank you for your help.
Regards,
Florence Lorenzo
This worked for me when adding it as an attachment, but I would like to have it as an image in the body of the email.
I was using the image tool, but I am unable to use it dynamically. It forces me to pick a static image file even after sorting through with my last process to select the most recent image file. Any suggestions?
Hi @Jon_ct
Did you ever resolve this for more than one file?
I can pull in latest file and attach it to email, but as soon as i add more than one file path i get the below erro: