PC Review


Reply
Thread Tools Rate Thread

Delete file larger than predefined size

 
 
Antonio Maciel
Guest
Posts: n/a
 
      3rd Sep 2003
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


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      3rd Sep 2003
Hello,

"Antonio Maciel" <(E-Mail Removed)> schrieb:
> 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
--
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
File size 20x larger than expected =?Utf-8?B?TV9Ib29k?= Microsoft Access 1 30th Nov 2005 02:41 PM
File size larger than expected =?Utf-8?B?Y2F0?= Microsoft Excel Misc 1 9th Jun 2005 08:49 PM
Does not support file size larger than 4 gb? Kram Windows XP General 4 5th Mar 2005 08:45 PM
File size is larger in XP than in Excel 97 kathy Microsoft Excel Misc 1 20th Mar 2004 09:23 PM
File size is larger in XP than 97 Kathy Microsoft Excel Worksheet Functions 1 19th Feb 2004 12:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:32 PM.