Skip to main content

Topic: filesize in megabytes (Read 2036 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • garthwen
  • [*]
filesize in megabytes
Can I show filesize in megabytes?

  • Zarkon
  • [*][*][*]
filesize in megabytes
Reply #1
%filesize_natural%. For future reference, see the titleformat reference.

  • garthwen
  • [*]
filesize in megabytes
Reply #2
%filesize_natural%. For future reference, see the titleformat reference.


Sometimes it's in KB, sometimes in MB.  How to make it always MB?

  • Robertina
  • [*][*][*][*][*]
  • Banned
filesize in megabytes
Reply #3
$div(%filesize%,1048576).$num($div($mul($mod(%filesize%,1048576),100),1048576),2)

--------------------------------------------------------
%filesize% displays the size in bytes. WIKIPEDIA says:

Quote
1 Kilobyte (kB) = 1024 Byte, 1 Megabyte (MB) = 1024 Kilobyte = 1024 ยท 1024 Byte = 1.048.576 Byte

That is the reason for this strange 1048576 in the syntax.

Reason for edit: additional hint.
  • Last Edit: 12 January, 2010, 11:02:11 PM by Robertina
This is HA. Not the Jerry Springer Show.

  • garthwen
  • [*]
filesize in megabytes
Reply #4
Just what I needed. Thanks!

  • TuNk77
  • [*][*][*]
filesize in megabytes
Reply #5
I use a similar string: $div(%filesize%,1048576).$left($num($muldiv($mod(%_filesize%,1048576),100,1048576),2),2) $get(anno)'MB')