-
1
- #1
You may find the following a little faster in retrieving the last ByteCount bytes from a file as a string:
Code:
[blue]Private Function tail(strFile As String, Optional ByVal ByteCount As Long = 1024& * 1024) As String
Dim hFile As Long
hFile = FreeFile
Open strFile For Input Access Read Lock Read As hFile
If ByteCount > LOF(hFile) Then ByteCount = LOF(hFile)
Seek hFile, LOF(hFile) - ByteCount + 1
tail = Input(ByteCount, hFile)
Close hFile
End Function
[/blue]