EDIT: Compatibility check done.
Code: Select all
end (<xyver> < "9.70.0007"), "Sorry - this script requires XYplorer version 9.70.0007 or higher.<crlf>Click 'Ok' to exit.";
msg "This will sum up all selected items and display their values<crlf>in the unit you indicate in the next screen. Allowed:<crlf><crlf>FLEX = [Default] Flexible (best unit is auto-selected).<crlf>FLEXR = FLEX, but rounded up.<crlf>KB, MG, GB, TB, or PB = usual bytes unit.<crlf>KBR = KB, but rounded up.<crlf>BB = Bytes (with unit)<crlf>B = Bytes (no unit)<crlf>RAW = Raw number (no unit, no thousand separators).", 1, ;
input $v, "Please enter the unit you want (FLEX/FLEXR/KB, MG, GB, TB, or PB/KBR/BB/B/RAW):", "MB";
$c2= report ("{Size RAW}+", 1); $t2= $c2; replace $t2, $t2, "-","0"; $t2= eval ($t2);
$a = formatbytes($t2, "$v", -1);
echo $a;
copytext $a;
status "Value on clipboard, too. Have a g'day!";
XYplorer Beta Club