LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compare & Copy Paste file to folder

Dear all,

 

I'm trying to copy and paste a file to a folder with the same name. My idea is, I tried to make a comparison between the file name and the folder name and if the same it will be copied to the folder according to the name. I tried to make code for this idea but it didn't work.

 

I'm attaching pictures and files for your reference :

SofeaNur_0-1674636870952.png

Copy file

SofeaNur_1-1674636916257.png

 

 

 

 

 

 

 

 

 

 

 

Paste into this folder by name

 

0 Kudos
Message 1 of 2
(744 Views)

Hi Nur,

 


@SofeaNur wrote:

I'm trying to copy and paste a file to a folder with the same name. My idea is, I tried to make a comparison between the file name and the folder name and if the same it will be copied to the folder according to the name. I tried to make code for this idea but it didn't work.

 You need to provide a full filepath also for the destination of your copy operation! (It does not allow to copy a file as a folder…)

Use BuildPath also for the destination as yoou do for the source of the FileCopy function.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 2
(736 Views)