VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



File Size

by Peter Elisa Souhoka (21 Submissions)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 17th July 2008
Date Added: Mon 8th February 2021
Rating: (1 Votes)

File Size

Rate File Size



Private Sub cmdShowFileSize_Click()
Dim strOldFile As String
Dim strOldSize As String
Dim strMyDir As String
Dim strMyFile As String

strMyDir = "c:\windows\desktop"
strMyFile = "readme.txt"

  strOldFile = strMyDir & "\" & strMyFile
  strOldSize = FileLen(strOldFile)
  
  lblFileSize.Caption = "The file " & strOldFile & " is " & _
  Format(strOldSize, "#,##0") & " bytes in size."

End Sub


Download this snippet    Add to My Saved Code

File Size Comments

No comments have been posted about File Size. Why not be the first to post a comment about File Size.

Post your comment

Subject:
Message:
0/1000 characters