Move file works but copy file does not work

Good day,

I want to copy and paste some files. When I use the move activitie it works perfectly…
But when I use the copy file activity with the same variables it does not work…
I get this error:
image

@artem1 you need to give file name with extension .

@artem1

In destination, you have to specify full filename along with extension.

How it would look like in my code?
Main.xaml (16.9 KB)

@artem1 In destination property of copy file activity you have to pass the filename with extension not the folder path.

But where is the file than stored?

But I also want to paste the file

@artem1 use Copy file activity as shown below

there is no error anymore but it does not move the files

@artem1 you have to use targetFolder+Path.GetFileName(file) in destination property of copy file activity.For move file activity just give targetFolder variable.

Main.xaml (16.9 KB)
I am using this code and it should work but it is not working.
Where is my mistake:
The file exists and is the right path:

@artem1 In copy file activity pass targetFolder+“\”+Path.GetFileName(file) in destination property.

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