J
Jarod_24
I got a Log-Class that writes to a file named "Event.Log"
But i need a way to determine when the file is larger than 1 Mb.
When the file is => than 1 Mb, i'll rename it to "Event.old" and create a
new file called "Event.log".
I tried with the following but it didn't work:
Dim oFile As IO.FileStream
Dim maxsize As Long = 1048576 '1 MB in bytes
'Code...
If oFile.Length >= maxsize Then 'Only allows files up to 1Mb in size
'Closing, Renaming & Creating new File...
End If
But i need a way to determine when the file is larger than 1 Mb.
When the file is => than 1 Mb, i'll rename it to "Event.old" and create a
new file called "Event.log".
I tried with the following but it didn't work:
Dim oFile As IO.FileStream
Dim maxsize As Long = 1048576 '1 MB in bytes
'Code...
If oFile.Length >= maxsize Then 'Only allows files up to 1Mb in size
'Closing, Renaming & Creating new File...
End If