Re: Formating bytes to Mbytes / Gbytes
Re: Formating bytes to Mbytes / Gbytes
- Subject: Re: Formating bytes to Mbytes / Gbytes
- From: John White <email@hidden>
- Date: Mon, 7 Apr 2003 19:23:46 -0400
This is what I use. Hopefully the values are correct for each
conversion.
if size !C 1.073741824E+9 then
set units to "gigabytes"
set size to size / 1.073741824E+9
end if
if size < 1.073741824E+9 and size !C 1048576 then
set units to "megabytes"
set size to size / 1048576
end if
if size < 1048576 and size !C 1024 then
set units to "kilobytes"
set size to size / 1024
end if
jlw
-------------------------------------------
Carthago delenda est
- Cato the Censor
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.