I am facing error while Sending mail with attachment via Send outlook mail message

I am facing error while Sending mail with attachment via Send outlook mail message

Please help me with basic properties setup

Fine
welcome to uipath community
may i know what was the error you were facing if possible with a screenshot
Cheers @AkshaySi

Hi Palaniyappan,

Just now i have rectified the issue.

Now, i wanted to delete some files (File name similar only suffix is different like . file name abs.xls, abs_12.xls, abs_233.xls and so on ) from specified path but unable to do it.

Screen is attached.

1 Like

Hi @AkshaySi
Before Deleting the files

ensure the file exists use path exists activity

Thanks
Ashwin S

Hi @AshwinS2,

yes, i have added the activity for export same kind of file later . so better cross check for correct file existence, i would like to delete all existing or older files so in further steps script will pick only latest file

Diagram —>> Delete file -->> Open browser >> go to the website >>> go the specific path >>> export the detail as attachment and placed in some folder >>> later send me as attachment .

so initially it is require to delete all existing or older files.

thanks
Akshay

hi @AkshaySi

While exporting the files in folder ensure the folder exist as well along with the files and then pass the filepath in attach activity of send outlook mail message

Thanks
Ashwin S

Fine
use a assign activity like this
arr_FilePath = Directory.GetFiles(“yourfolderpath”,“abs*.xls”)
where arr_FilePath is a variable of type string array

–now use a for each loop activity and pass the above variable as input and change the type argument as string in the property panel of for each loop activity
–inside the loop use a DELETE FILE activity and mention the file path as item.tostring

thats all it would delete those files in that folder
hope this would help you
Cheers @AkshaySi