原贴地址:http://bbs.blueidea.com/thread-2864029-1-1.html
参考资料:http://zh.wikipedia.org/w/index.php?title=Yottabyte&variant=zh-cn
1 2 3 4 5 6 7 8 9 10 11 12 | Public Function SenFe_GetFileSize(iSize) Dim aUnit, sUnit, I aUnit = Array("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB") I = 0 sUnit = aUnit(0) Do While iSize >= 1024 And I < UBound(aUnit) I = I + 1 iSize = iSize / 1024 sUnit = aUnit(I) Loop SenFe_GetFileSize = FormatNumber(iSize, 2) & " " & sUnit End Function |
转载请注明出处