From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to i read multiple text files one bye one

Solved!
Go to solution

hi all

 

I need to select the text files multiple times and read files one by one

 

some how i managed to select the one text file and scan the data in the text file

 

i need to do this for mutiple files at the same time

 

please help me untitled.JPG

0 Kudos
Message 1 of 18
(7,337 Views)

If you know how to process one file, take that VI, put it inside a loop and pass in an array of file paths.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 18
(7,329 Views)

Post your work so far. We will take it from that point...

 

Mathan

0 Kudos
Message 3 of 18
(7,317 Views)

To be more exact, use a FOR loop with autoindexing turned on for you array of files.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 18
(7,314 Views)

gowthamggk wrote:

I need to select the text files multiple times and read files one by one

some how i managed to select the one text file and scan the data in the text file

i need to do this for mutiple files at the same time


Great!! You managed to read one file.. Now the same code you might need to repeat in a For loop... Well everyone is suggesting the same and that's the only way (for repetitive work, it needs to be done in a loop).

You also need the array of file paths, and very importantly you need to learn the concept of Auto Indexing.


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 5 of 18
(7,305 Views)

i want to handle mutiple file for this VIUntitled.jpg

.. this is program for pinging the systems 

 

0 Kudos
Message 6 of 18
(7,288 Views)

Can u attach your VI?  That image is to small to see anything....

0 Kudos
Message 7 of 18
(7,282 Views)

Post your vi instead of an image.

 

Mathan

0 Kudos
Message 8 of 18
(7,281 Views)

i sucessfully reading one text file through this VI

 

but as like this .. i need for multiple files 

 

also shld read the text line by line 

 

please help me frnds...

0 Kudos
Message 9 of 18
(7,254 Views)
Solution
Accepted by topic author gowthamggk

@gowthamggk wrote:

i sucessfully reading one text file through this VI

but as like this .. i need for multiple files


Why are you not using For loop???

 

Use FOR loop for reading multiple files


@gowthamggk wrote:

also shld read the text line by line


You can right click the 'Read from Text File' function and select 'Read Lines'. Refer to below code snippet.

Read lines from text file_Code


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


Message 10 of 18
(7,243 Views)