Get Freespace on > 2GB drives
This code will return the freespace on a drive even if it exceeds 2GB.
AI
Riepilogo AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Codice sorgente
Public Function GetDriveInfo(DriveName As String) As String
retval = GetDiskFreeSpace_FAT32(Left(DriveName, 2), FB, BT, FBT)
FBT = FBT * 10000 'convert result to actual size in bytes
If FBT / Gigabyte < 1 Then 'If less than 1GB then show as MB
DriveSize = Format(FBT / Megabyte, "####,###,###") & " MB free"
Else 'Show as GB
DriveSize = Format(FBT / Gigabyte, "####,###,###.00") & " GB free"
End If
GetDriveInfo = "[" & DriveSize & "]"
End Function
Commenti originali (3)
Recuperato da Wayback Machine