Delete file larger than predefined size

  • Thread starter Thread starter Antonio Maciel
  • Start date Start date
A

Antonio Maciel

Hi.

I wrote a class to create a log file for my application using streamwriter.
I would like to have a property that sets a limit in kb for the log file and
possibly a method to delete the file if it is larger than the limit defined.
How can I verify the size of a file in kb before write anything to it?

Thanks,

Antonio Maciel
 
Hello,

Antonio Maciel said:
How can I verify the size of a file in kb before write anything
to it?

'FileLen(PathName)' returns the length of the file 'PathName' in bytes.

HTH,
Herfried K. Wagner
 
Back
Top