LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create list of files in folder, choose file and show choosen one

Hello,
I have got several txt-files in a folder. I list them with "List Folder".
Now I want to choose one of them and show it in a string indicator.
 
Unfortunately I dont know how to implement that. Can someone please help me with that ?
 
Karl-Heinz
0 Kudos
Message 1 of 5
(4,314 Views)
I found a way. Index the array with the file-name-strings with a numeric control. then build path with dup path of "List folder" a \  and the string. done.
 
But is there a way to do this with a listbox or table ?
0 Kudos
Message 2 of 5
(4,310 Views)
Sure for a listbox just use the "item names" property to store and retrieve the filenames which will be a 1-D array and the value of the listbox to index the array then do the rest as you have already done.

For a table you'll need to index the 2-D array.

I've attached an example using the listbox.



_______________________________________
Systems Test Engineer
Certified LabVIEW Architect (CLA)
0 Kudos
Message 3 of 5
(4,300 Views)
thx a lot.
 
I will try it. Is there may be also a way to do that without an event-structure and maybe without the "Get Files"-Button ? I think it would be better if the files in the folder would be stored there automatically.
 
Karl-Heinz


Message Edited by suppi on 11-22-2007 02:23 PM
0 Kudos
Message 4 of 5
(4,272 Views)
Here is the vi without the event structure or get files button. It will update the files in the listbox when the selected folder changes.
_______________________________________
Systems Test Engineer
Certified LabVIEW Architect (CLA)
Message 5 of 5
(4,246 Views)