Get Freespace on > 2GB drives
This code will return the freespace on a drive even if it exceeds 2GB.
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.
كود المصدر
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
التعليقات الأصلية (3)
مسترجع من Wayback Machine