Hi,
In the file I/O functions there is an Advanced File Functions sub menu.
There you can open a reference to a file, and read data from it. The first
line is easy, just use Read File, and set the Line Mode (F) to true.
The last line is a bit trickier. You can use the Seek function to get the
length of the file. Set a counter to this position-1. Read one character
from this position. Subtract the position with one, and read another
charater. Put is before the previous string. Repeat until a \n is
encountered.
If you know how long the last line is going to be at maximum, you can read
this number of characters, and split the string on the last \n. This is
easier but not general appliable.
Also think about what you want to do when the last line is the first line.
Note that this method is only worth the effort when the files get large
(below a few MB I'd use a method like suggested by Dr. Imad).
Regards,
Wiebe.
"Jules K." <x@no.email> wrote in message news:169785@exchange.ni.com...
> I would be very happy if some one of you can help me.<br>I attached a text
File as example<br>thanks<br><br>Jules
>
>
> text_file.txt:
> http://forums.ni.com/attachments/ni/170/100033/1/text_file.txt