SMTP - File path is getting appended to the file name in the attachment

Hi, I am using SMTP activity to send files. While attaching the file I am using this assign statement:

I am assigning this variable to the AttachmentsCollection:


This is the file that I am sending:
image

But I receive the file like this:
image

The folder path is appended to the file name.
Any help will be appreciated.
Thanks

@chauhan.rachita30

Try below expression and check it once.

      Directory.GetFiles("Data/logs/","*.txt")

Hello @chauhan.rachita30 ,

Did you tried printing the filenames in a message box?

Please check the below post. It should help.

The solution to this issue is: I was using the wrong slash in the path. Should be \ instead of “/”.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.