LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

List Folder => For Loop?

Solved!
Go to solution

Hi! I'm trying to have a program where I have a folder of files I need to process sequentially (preserving order) through a subvi and then collect the data for each one, also sequentially. I've seen people say to use the List Folder function and then index through them using either a for or while loop, but I'm not sure how to index them. I'm working on an old version of Labview (7 I think), so maybe some things are kinda weird with that, too.

 

I'd appreciate any help or insight! 🙂

0 Kudos
Message 1 of 3
(363 Views)
Solution
Accepted by topic author yippeeyay

"List folder" gives you the path and an array of filenames in alphabetical order (e.g. abc9.txt is after abc10.txt). Of course you can sort any other way (e.g. by modification date, etc.) with a bit more code. Then just autoindex on a FOR loop.

 

In a nutshell:

 

altenbach_0-1719435155221.png

 

Message 2 of 3
(327 Views)

I love you and thank you so very much. It worked! ❤️ 😄

0 Kudos
Message 3 of 3
(286 Views)