Copy File Activity Could Not Find Part of the Path

Disclaimer: I am very new to UiPath (been using it for a week). I am unable to get my ‘Copy File’ activity to work.

Problem: I want to copy an Excel file I have and make a new version of the file within the same folder. From my understanding, the ‘Copy File’ tool can take the original file and output a copy of that file. In the ‘From’ and ‘To’ sections of the ‘Copy File’ tool I use a variable for part of the file path. Please refer to the attached screenshot. I’ve confirmed that the default for my variable is indeed the correct file path and leads to the folder and files you see in the screenshot.

Any help is very much appreciated. I did blur out some of the file paths for confidentiality purposes.

Hi @d_taylor

Remove.ToString from both the file paths. Try running the flow.

Hope it helps
Regards

Hi @d_taylor,

To check for any spelling mistakes, paste the path exactly in the run command and check if its able to open the file.

If there are no mistakes in the path, I think the issue would be in the new file name that you have given in the “To” field. As far as I know, excel doesn’t allow to save a file with “/“ even when we try to do it manually.

Try changing your file name to,

Invoice_Taylor_Daniel_12_7_23.xlsx

Hope it helps

Cheers!

@d_taylor

Welcome to the community

/ is the issue here …file and folder names cannot contain few characters and one such is this…please use a _ or - in plce and then try to save

Cheers

Thank you all so much! The issue was with using the '' symbol for the date like y’all were saying. For those who run into the issue, I instead used this as the To field: FileFolder+“\Invoice_Taylor_Daniel”+DateTime.Now.ToString(“yyyy-MM-dd”)+“.xlsx”

Sorry, the backslash symbol was what I meant to type.

@d_taylor

Is it resolved ?

Looks like the file path is not correct
Please make sure the file path is correct before performing this operation, you can use path exist to make sure it exists and return a boolean variable, with the true value of boolean we will transfer the file
regards,