Thread: Reloaded Script
View Single Post
  #20  
Old 13-02-2016, 14:57
JRD!'s Avatar
JRD! JRD! is offline
Registered User
 
Join Date: Sep 2015
Location: Matrix
Posts: 274
Thanks: 225
Thanked 600 Times in 168 Posts
JRD! is on a distinguished road
Add this function in your script, i made the choice to define megabytes...

Code:
Function MbOrTb(Byte: Extended): String;
begin
if Byte < 1024 then Result:= NumToStr(Byte) + ' MB' else
  if Byte/1024 < 1024 then Result:= NumToStr(round(Byte/1024*100)/100) + ' GB' else
     Result:= NumToStr(round((Byte/(1024*1024))*100)/100) + ' TB'
end;
Reply With Quote