ReadLastChars

Reads last some characters of a file, needs to see contents of large files that Notepad and Notepad++ are refusing to open.

CodeFunctionName
What is this?

Public

Tested

Original Work
Function ReadLastChars(Filename, Optional Chars=1000)
    ' Gets last characters in a file
    '    Used in large files, like ~7gb large
   
    Rett = ""
    Close
    Open FileName For Input As #1
    Do Until Eof(1)
        Line Input #1, F001
        Doevents
        If Rett > "" Then Rett = Rett & vbcrlf
        Rett = Rett & F001
        Doevents
    Loop
    Close
    ReadLastChars= Right(Rett, Chars)
End Function

Filename, Optional Chars=1000

Views 96

Downloads 38

CodeID
DB ID