Save Attachment Activity

How do I rename the attachment from outlook before it get’s saved into a folder. Let say I have two excel files with the same name I want the timestamp to be saved along with it so it does not get overrided with the Save attachment activity.

Can someone please help or post there studio for that. I have looked through various forms and nothing is helping mewith this issue.

Hi @Paul1
Welcome to forum

You can check this link

This is for studiox but it is applicable for the studio too the logic part

Hope it helps you

Regards

Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed:

That’s not what I need I can already do that… I have the attachments save to a folder then I move it to a different folder and rename it based on properties inside the excel file. My issue is pertaining to files in the inbox with the same name. The bot overrides the attachment is the save attachment step because it needs to be renamed at that step first not the move file step.

@Paul1 …in that case…you may try saving the file by adding ddmmyy hh:mm:ss:fff …

Yes that is exactly what I need. I will upload my file. I was able to save the variable in that format but after that I’m stuck how to do I use that variable to save in that format. Capture

Hi Paul1,

You can do following steps,

  1. Use Save Attachment activity to save the attachment in your package folder.
  2. Assign the attachment name to some variable, now you have access to that particular attachment file.
  3. Use Move file activity and give path and new name which you want .

In this way you can rename the attachment.

Hope it helps,

Regards,
Sahil Garg

get attachment.name and do some string manipulation.

such as:
attachment.name=attachment.name+date.tostring

maybe need to get name without “.xlsx” but basiclly that’s the way i rename the attachment before saving to folder.