* Graham  
Total Folder size
This taught me a new trick in xtscript
<!--parser:xtscript-->
var $list = <xt:filelist folder="/my_folder/files" template=".file_size_mb." per_page="" />
var $list= call str_replace $subject=$list;$search=MB;$replace=+
var $list=($list)
print $list MB
<!--/parser:xtscript-->

Copy code

The filelist xt function creates a list of the sizes of all the files in the folder in megabytes
ie: 1.05MB2.34MB0.99MB3.04MB
the str_replace replaces the MB with a + sign
the $list=($list) evaluates $list as maths (because it is in brackets) so it adds all the values together
then you print out the result

This also works if you leave out
var $list=($list)
and use
print ($list) MB
instead
2014-05-28 22:39 (edited 2014-05-28 23:51 by Graham ) · (4)
* onedc * Graham wow.. this is great sir.. (y)
2014-11-20 07:08 · (0)
* gratis-mp3.xtgem.com * Graham Is know :-D
2014-12-15 18:51 · (0)

Online: Guests: 1