Very helpful to have a script out there that already knows how to convert those sizes. I would hate to have to find out how many bytes were in something and then put the conversion into code. I like how it is organized and such.
Misleading title and tags - my first though on seeing your code was "Why not use filesize?". Maybe rename/retag your script along the lines of 'converting bytes to other units' or something?
-----------------------
Proud owner of scriptsentials.com and the Scriptsentials network.
=================
Matthew R. Miller
http://bluecreststudios.com
http://www.codeandcoffee.com
Otherwise, a useful bit of code!