Sum Up File Sizes and Convert Units.

Discuss and share scripts and script files...
Post Reply
SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Sum Up File Sizes and Convert Units.

Post by SkyFrontier »

ToDo: I promise - some day I'll add XY version compatibility to my scripts... and comments, too! :wink:
EDIT: Compatibility check done. 8)

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!";
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

Post Reply