I have a following process to automate in my PA: When email arrives to outlook's specific folder, save email's attachment to Onedrive folder.
Problem: attachment files often have same names, despite different content.
I need either to :
- Check if file with same name already exists in onedrive, if so - add counter or something, like 'file_2..3..4'
- Or probably easier - Save attachment file with date, like 'attachment_dd.mm.yy.xlsx'
How could this be achieved properly?
Currently, I have tried the 2nd options, with filename concat with emails date, but perhaps there is a better way: