Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Reason for this request is that FileRead is just too slow.
Binary read version
filename = "c:\test\test.txt" size = FileSize(filename) hnd = BinaryAlloc(size) ret = BinaryRead(hnd,filename) start = 0 While @TRUE found = BinaryIndexEx(hnd,start,@CRLF,@FWDSCAN,0) If found == -1 If start >= size - 1 Break EndIf found = size - 1 ; last line does not end in a crlf EndIf line = BinaryPeekStr(hnd,start,found-start+1) Message("read",line) ; You would do your stuff here start = found + 2 If start >= size Then Break EndWhile BinaryFree(hnd) Exit
FileGet version
filename = "c:\test\test.txt" file = FileGet(filename) file = StrReplace(file,@CRLF,@TAB) llinecount = ItemCount(file,@TAB) For ii = 1 To linecount line = ItemExtract(ii,file,@TAB) ; You would do your stuff here Next Exit
Article ID: W15894
File Created: 2004:03:30:15:41:30
Last Updated: 2004:03:30:15:41:30