LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Copy files from 3 folders to a backup folder

I want to copy files from 3 folders to a backup folder. But I need to design the code in such a way, there are 2 options. 1st option is All data i.e from all 3 folders. 2nd option is Defined data i.e if I click defined data, I can select one of the folders. So how do I do this. The copy part is ok. I have done a detailed backup program to copy files. But that is with one folder. I need to modify it to do the above. I am currently struggling with the first option. How will I give 3 folders to a list folder. Because in my backup program the 1st part is a list folder. That is part I am struggling now. When that is done, second option comes which is how to do something that lets u select a folder when u run the program. Please I need help with this. If anyone could help me, give me some ideas that would be helpful. There are actually 2 more options called data older than and data younger than. But primarily I am trying to do the first two options. Thanking You.  

0 Kudos
Message 1 of 5
(2,774 Views)

Hi vindsan,

 

if I click defined data, I can select one of the folders

Then you need to create an UI with the possibility to select the folder. I prefer to use Listboxes for applications like these…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,761 Views)

Thank You. But I still need help with first option. Is there any way to do that. So far I have thought of a idea like this. To keep the the three folder paths in a cluster, convert the cluster to an array, take the array size, which is obviously 3, give the array size to a for loop to run it 3 times and unundle the cluster inside the loop to get the 3 paths. Now I need a way to execute each of these paths one by one as the loop increments. I need something like inside the loop, as the loop iterates the first time, path 1 from the unbundle cluster gets executed, then in 2nd iteration path 2 and finally in 3rd path 3. I am not getting any idea. If you have any idea please help me. If u think this idea of mine is wrong, u can also suggest some better idea. Thanking You.

0 Kudos
Message 3 of 5
(2,731 Views)

You are over complicating it - LabVIEW will very simply do what you request:

ClustertoArray.png

 

The sequence structure isn't required - it's just so you can see that the auto-indexing tunnel is returning a single path.

 

This is pretty basic LabVIEW so I suggest having a look at some training materials.


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 4 of 5
(2,722 Views)

Thank You Very Much. 

0 Kudos
Message 5 of 5
(2,709 Views)