Jump to content

filereadline from the end to the start


tarre
 Share

Recommended Posts

Here a little example which reads from the bottom till the top:

#include <file.au3>
$CountLines = _FileCountLines("test.txt")
$file = FileOpen("test.txt", 0)

; Check if file opened for reading OK
If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf

; Read lines of text until the top of the file is reached
For $i=$Countlines to 1 Step -1
    $line = FileReadLine($file,$i)
    MsgBox(0, "Line read:", $line)
Next

FileClose($file)

Greetz,

Neo

[center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...