LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting multiple files during run time from a list of files

Solved!
Go to solution

Hey 

 

I have text files in a folder and I am looking to list out all the files in the folder and then manually select a few files out of it ( while the program is running) and average the data in the selected file alone. Using list folder, I could get the file list. But since the file list is in array of string format , I can't do any selection. I also tried combo box. It can select only one file at a time. Is there any other way ?

 

 

Many Thanks

Neeraj

0 Kudos
Message 1 of 6
(3,479 Views)

Load the names as string into a listbox and configure it for multiple selections. The value will be an array of indices that you can use the get the subset of files you want.

 

Use ctrl-click to select individual files.

0 Kudos
Message 2 of 6
(3,444 Views)

Use a listbox (& set the selection mode), or use a file dialog set to allow multiple selection.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 6
(3,443 Views)

Hey ,

 

Thanks for the reply. I loaded the string into listbox and configured it to multiple selection. But how to retrieve the value of the indices that is selected in the list box?

0 Kudos
Message 4 of 6
(3,428 Views)
Solution
Accepted by topic author neerajp

As I said, the "value" of the listbox is an array of indices. Just autoindex it on a for loop containing an "index array" to get the elements of your array of paths.

0 Kudos
Message 5 of 6
(3,422 Views)

Hey

 

Thank You so much. It worked. 🙂 

 

 

0 Kudos
Message 6 of 6
(3,414 Views)