=> Use create folder activity to create a new folder which name it as a Output Folder.
=> After Create folder activity place the For each file in folder activity to iterate the files in the Input folder. In the Filter of this activity to get only pdf’s. “*.pdf”
=> Inside for each Insert the Move File activity to move the
→ From Field - Give the CurrentFile.toString
→ To Field - Give the Path of Output Folder that we created at first.
=> Outside of for each Insert the Compress\Zip Files activity to zip the Output folder. In the options of Compress\Zip activity select the Folder option. In the Content to Zip field give the Output folder path.
=> After this use the send outlook mail message activity to send the mails.
→ Open the Attach Files option create an argument and Give the path of the Compressed Output Folder Path.
In To section I think you are using CurrentFile.Tostring it prints whole path if you are trying to get the file name give like this CurrentFile.FullName
Try this
"C:\Users\lrtetala\Documents\UiPath\ExcelCompare"+CurrentFile.FullName+…
You have given CurrentFile.toString right, this has contains the Whole path of the file.
I think in To field you have concatenated the Path with CurrentFile.toString.
It will be like to paths.
If you want the name in the CurrentFile then use this CurrentFile.Name.toString in the Place of CurrentFile.toString in To field.