Download an file with its extension

Greeting of day to all…
I have a task of downloading the attachments from mail and rename it with senders mail id and date. i am almost done with it. But still i am facing a problem where when same sends sends me 2 file on the same date the first file gets renamed and the other does not get renamed how can i make to rename the other one with any suffix such as 1 etc

Thanks and Regards

hello @soumi_soumiya

before saving attachment, try path Exists activity.

if already file is there with same name, then add 1 to your new file name


1 Like

@soumi_soumiya while saving the attachments save with send time.

did it but still have prblm

@soumi_soumiya did the sender sends the two attachments at a time or after a while.

time may vary or at same time it depends on the sender

hello @soumi_soumiya,
could you share your workflow here, so we could study what could be causing the problem


Thanks for your reply
book1234.xlsx (7.8 KB) forum query 1.xaml (48.0 KB)

Use path exist if already exist then in reaname add “(1)” or use counter as a=1 and in renameing “(”+a+")"

@soumi_soumiya i think while downloading if you give timestamp like now.TimeOfDay.ToString it might work becoz of slight variance in the sec.