LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

List folder file order

Solved!
Go to solution

Hello,

New to LabView. I've created a VI which reads and analyzes (RMS and mean power frequency) .txt files in a folder, then appends the data to a single text file. I've noticed, however, that when I remove my for loop and read and write the files individually, I get different values from my 'bulk read' program. I'd like to do one of two things 1) be able to strip off the first 20 characters of the file name and add those characters to the appended file or 2) know how to modify the order in which the .txt files are read and appended. I am analyzing muscle contractions, so the order is of utmost importance. I have attached my VI. Thank you in advance. Smiley Wink

0 Kudos
Message 1 of 4
(3,010 Views)
Solution
Accepted by topic author Stock25

Perhaps you are being bitten by the fact that alphabetical order does not always mean numerical order. If your files are text1.txt, text2.txt, etc., then the alphabetical list is text1.txt,text10.txt,text11.txt,...text2.txt,text20.txt.

 

A few workarounds, if this is the case, but my first suggestion would be to rename the existing files and pad the numbers used in all future measurements.  text01.txt or text001.txt depending on the expected number of files.

Message 2 of 4
(2,978 Views)

Hey, thanks a ton, Darin. This worked great! Just have to rename some files. Thank you.

0 Kudos
Message 3 of 4
(2,972 Views)

Hi,

Sorry for the intrusion.

I have a problem:

Using the "list folder" I have a list of files. I would make sure to read the files in the folder to a specific file.
Does anyone know how to do?

0 Kudos
Message 4 of 4
(2,679 Views)