Forum Discussion
Concat "Todays Date" for File Name - Save Attachment - Help
Hi Damien_Rosario ,
I'm having the same issue with my attachment filename. I have 2 files with the same name coming into a mailbox as attachments, one is a .pdf and the other is a .xlsx. I want to remove the files from the email, and save them to a SharePoint library with today's date/time added to the filename.
Current attachment filenames:
attachmentname.pdf
attachmentname.xlsx
Desired attachment filenames in SPOL:
attachmentname_03-26-2021-2-10-PM.pdf
attachmentname_03-26-2021-2-10-PM.xlsx
In my Create File action, in the File Name field, I've tried using 'Attachments Name'_'Received Time' dynamic content dialogue.
That appends the date after the file extension, attachmentname.pdf_03-26-2021-2-10-PM, giving an unknown filetype.
If I add .pdf in the File Name,
then I get a usable filename, attachmentname.pdf_03-26-2021-2-10-PM.pdf, but it obviously changes my xlsx file to a pdf extension as well.
Any thoughts on how to accomplish this? Appreciate any help you can provide.
Hi Justin_Gangl
Rob's solution covers a solution pretty well in the order you want to see it in.
Alternatively, you could put the received date at the front of the name followed by the file name. This way the extension will always work and will require no additional actions.
Cheers and best wishes
Damien
- Justin_GanglMar 29, 2021Copper Contributor