DaveyCrockett
Programmer
Is there a way to limit how big a file can grow and to delete or overwrite old data. ie. I have a VB Application that is writing to a log file using APPEND. This file can get pretty big if I don't clean it up.
This is my function that writes to the file:
Public Function WriteToFile(LogFile As String, LogMsg As String)
On Error Resume Next
Open LogFile For Append As #1
Print #1, LogMsg
Close #1
End Function
I call this function as follows:
WriteToFile App.Path & "\LogFile.txt", "String that gets inserted into the file"
Would any of you know how I could limit the file to say 100k?
Thanks
This is my function that writes to the file:
Public Function WriteToFile(LogFile As String, LogMsg As String)
On Error Resume Next
Open LogFile For Append As #1
Print #1, LogMsg
Close #1
End Function
I call this function as follows:
WriteToFile App.Path & "\LogFile.txt", "String that gets inserted into the file"
Would any of you know how I could limit the file to say 100k?
Thanks