by CoMPuTer MAsSteR (3 Submissions)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 17th July 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This code is able to display filesizes larger than 2GB. Instead of displaying negative values for files over 2GB, this function returns the
'Display any file's filelen over 2GB and up to 4GB
'Any file over 4GB will only display how much over 4GB the file is
'EX: If a file is 4,698,767,360 bytes (4.37GB), it will only display 403,800,064
' In other words, 4,294,967,296 (4GB) + 403,800,064 = 4,698,767,360 (4.37GB)
'
'If you have any suggestions on how to fix this, or if you even can, email me at:
' [email protected]
Dim tMaxGB As String
tMaxGB = "4294967296"
If FileLen(iFile) < 0 Then
GetFileLen = CStr(Val(tMaxGB) + FileLen(iFile))
Else
GetFileLen = CStr(FileLen(iFile))
End If
End Function
No comments have been posted about This code is able to display filesizes larger than 2GB. Instead of displaying negative values for f. Why not be the first to post a comment about This code is able to display filesizes larger than 2GB. Instead of displaying negative values for f.