While downloading email Attachments, It is downloading email logo and etc

Hello,

Task Is : Download all email attachments into folder.
Issue is : It is downloading extra images (Company’s logo, or any other image attached at the end of the email).

I do not want to download an extra image Like LOGO and etc… Can anyone help me on this?

Thank You

Hi @pari_patel

You can simply download the attachment as its with the Company logo ect

After the save attachment sequence. Drive the for each loop on that directory where you have saved the attachment. and use the below if condition

If = path.GetFileName(item).ToString.EndsWith(".PNG")

PNG - Based on image and logo format you can change it.

Then use the delete activity in the ‘Then’ sequence.
after that Image file will be deleted from that folder.

Regards
Gokul

Hi!

Have a view on this

Regards,
NaNi

Hey @Gokul001 I understand this scenario but my attachments also comes as an .PNG or . GPEG sometimes.

So, In this case If I try to delete any images it will delete my attachments as well.

Hey @THIRU_NANI Thanks for sharing. I am saving attachments into folder but I want to delete an extra Logo images.

Can you help me out on this?

Thanks

Hi!

This thread will help you to achieve your requirement

Regards,
NaNi

Hi @pari_patel

Use For Each File in Folder Activity → Uipath.System.Activities
**

CurrentFile.Extension.Equals(".jpeg") or CurrentFile.Extension.Equals(".png")

**
Refer to the screenshot
image

Hope it will solve your query

Regards
Gokul

Hey @Gokul001 Thanks for sharing but my question is I can receive PNG and GPEG as attachments also which is required to download but signature or logo images I do not want to download.

Thanks

Regards,
NaNi

After saving the attachments, go to the folder where the attachments are downloaded and check if all the unwanted images contains common names eg:image01, image02 .If there are such match, then select the all specific files that contains the name ‘images’ and delete them.

1 Like