LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to a specific line in text file

hi let say text file with five lines
i need to write it in a specific line example line 3.
how to do tht,
thk u
0 Kudos
Message 1 of 6
(4,599 Views)
Hi jeyanthi,
here is an example how you can solve it with your data.
Hope it helps.
Mike

Message Edited by MikeS81 on 05-23-2008 08:05 AM
0 Kudos
Message 2 of 6
(4,593 Views)

In Mike's example, you cna change the constant 2 to a control which allows ytou to select which line to write to.

2 meaning the third position becasue indexing starts at 0.  😉

0 Kudos
Message 3 of 6
(4,565 Views)
I read the question as wanting to insert text into an already existing text file. If that's the case, you need to read in the text file, insert your text, and then write out the new text to the file.

Could be wrong though.
0 Kudos
Message 4 of 6
(4,535 Views)

@Mike can you tell me what is the name of that block which is  deciding line number (input "2")

0 Kudos
Message 5 of 6
(2,426 Views)
0 Kudos
Message 6 of 6
(2,418 Views)