Error : Cannot find this file. Verify the path and filename are correct

Hi All,

I’m Trying to send “salary slip” to multiple recipients. I have saved all the salary slip files in one folder and gave the same path in the Workflow. I have tried multiple solutions like spell check, giving only fileName, giving full path, etc. But still facing this issue.


image
Please help me :slight_smile:

Hi @Vaishnav_Tej

In the Attachment column You need to give the full filepath. Not the only the Filename

Like this : C:\Users\Dell\Documents\UiPath\Test\Filename.pdf

Hope it will work

Regards
Gokul

Try to put the complete file path like

D:\FolderofPaySlip\E101_SalarySlip.pdf

1 Like

I have to send mail to all recipients who are in the excel sheet list. so I cannot attach single file like you mentioned :- D:\FolderofPaySlip\E101_SalarySlip.pdf

image
image

@Vaishnav_Tej give full path in attachment

@Vaishnav_Tej
Write like this-> "D:\FolderofPaySlip"+email(“attachment”).ToString
its dynamic full path

Hi @Vaishnav_Tej

You can attach more attachment by click create Argument

Path should look like → Folder path + Filename.PDf

Regards
Gokul

Yes, I tried to give Full Path aslo. But still same error…!!

@Vaishnav_Tej you have missed “back slash” after "project\attachment"+email("Attachment).ToString

Hi @Vaishnav_Tej

You have missed an \ in the last

"C:\Users\Dell\Desktop\Bat Files\"+email(“attachment”).ToString

Regards
Gokul

Yes , First I gave back slash but facing same error so I removed. But still getting same error with \ or without \

Hi @Vaishnav_Tej

Have you tried to print the path in the Log Message?

Use Trim at last in the expression

"C:\Users\Dell\Desktop\Bat Files\"+email(“attachment”).ToString.Trim

Regards
Gokul

You should give the File Folder path in the attachment

"D:\FolderofPaySlip\"++email(“attachment”).ToString.Trim

Share the Folder path with where the file is allocated @Vaishnav_Tej

Adding .trim is also not working

I think so your File extension in Txt format

"D:\FolderofPaySlip\"+email(“attachment”).ToString.Trim+".txt"

I changed to .txt and tried. But Same error again.
image

Share the excel screenshot @Vaishnav_Tej

Hi @Vaishnav_Tej

Try with these to syntax

"C:\Users\User\Documents\UiPath\.tutorial\EmailAutomationProject\Attachments\"+email(“attachment”).ToString.Trim+".txt"

Or

"C:\Users\User\Documents\UiPath\.tutorial\EmailAutomationProject\Attachments\"+email(“attachment”).ToString.Trim

Regards
Gokul

Yes I tried this syntax as well. But not resolving.