tarre Posted September 24, 2008 Share Posted September 24, 2008 heya. im searching for an function that reads my file from the end to the start. ive searched \ googled but didnt get anything this would be very useful. thx Link to comment Share on other sites More sharing options...
NeoFoX Posted September 24, 2008 Share Posted September 24, 2008 Perhaps have a look at the nice function called: FileReadLine(); 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 More sharing options...
tarre Posted September 24, 2008 Author Share Posted September 24, 2008 Perhaps have a look at the nice function called:FileReadLine(); Neobut that reads from the top to the bottom. i want to read from the bottom to the top :/. i dont have any ideas how to acomplish that. Link to comment Share on other sites More sharing options...
NeoFoX Posted September 24, 2008 Share Posted September 24, 2008 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 More sharing options...
tarre Posted September 24, 2008 Author Share Posted September 24, 2008 thanks alot. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now