File Seek
Re: File Seek
See this example:Zooker wrote:Can anyone email me a snippet of code showing how to use File Seek!![]()
Code: Select all
If OpenFile(0,"test.txt") ; Create a new file for testing
For i = 0 To 20
WriteStringN("Line #" + Str(i)) ; write one line at time
Next i
CloseFile(0) ; Close the file
EndIf
If OpenFile(1,"test.txt") ; Now we will read the file
FileSeek(100) ; But start reading at one specific point of the file
Line$ = ReadString() ; read at this point
MessageRequester("",Line$,0) ; See the string readed
CloseFile(1)
DeleteFile("test.txt") ;delete the file
EndIfARGENTINA WORLD CHAMPION

