![]() |
| ||
| Finding file size Can any one give me code for finding size of my log file using VB.NET???? Also I want the code to make my log file of 1KB only and not more than that. :'( |
| ||
| Re: Finding file size Quote:
I want vb.net code for getting file size for a particular log file and delete data based on date if the file size exceeds the limit. |
| ||
| Re: Finding file size please send me the code for the above mentioned one.. |
| ||
| Re: Finding file size To Get File Size: ============= Imports System.IO Private Function GetFileSize(ByVal MyFilePath As String) As Long Dim MyFile As New FileInfo(MyFilePath) Dim FileSize As Long = MyFile.Length Return FileSize End Function DELETE COMMAND: ============ MyFile.Delete() Make sure the file is not ReadOnly, AlreadyInUse B4 deleting, or u get exception. |
| ||
| Re: Finding file size Thanks for the code I need the code for opening the file and deleting based on date.. please help me.. the other code was really helpfull.. |
| All times are GMT -4. The time now is 10:39 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC