How to attach all the files from specific folder except one particular file to the email.
only the name of the file which should not send is known.
Help!!!
Try below expression.
arrFiles = Directory.GetFiles("FolderPath").Where(Function(x) Not x.ToString.Contains("FileName")).ToArray
Here, arrFiles is of type Array of String. Pass arrFiles to AttachmentCollection field to attach multiple files to email.
Thanks, let me try
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.