EverythingFolderSize column (Calculate folder sizes via Everything tool)

Discuss and share scripts and script files...
Post Reply
Norn
Posts: 416
Joined: 24 Oct 2021 16:10

EverythingFolderSize column (Calculate folder sizes via Everything tool)

Post by Norn »

Index folder size.png
Index folder size.png (22.14 KiB) Viewed 406 times
EFS.PNG
EFS.PNG (16.26 KiB) Viewed 406 times
Last edited by Norn on 16 May 2023 20:14, edited 2 times in total.
Win10, Win11 @100% 2560x1440 22H2

Norn
Posts: 416
Joined: 24 Oct 2021 16:10

Re: EverythingFolderSize column (Calculate folder sizes via Everything tool)

Post by Norn »

Split into two parts, faster! Everything tool must be running!

To -> Configuration | General | Custom Event Actions | Before browsing a folder.

Code: Select all

/*
***************************************************************************************************
@Author  : https://www.xyplorer.com/xyfc/viewtopic.php?t=24909
@Created : 2022-07-23
@Modified: 2023-06-19
@Function: EverythingFolderSize column (Calculate folder sizes via Everything tool)   Configuration | General | Custom Event Actions | Before browsing a folder
@Version : v1.8.3
***************************************************************************************************
*/


 if($exec != 1 && exists(<newpath>)) {
    $es = """<xyscripts>\EV FOR XY\es.exe""";                                // es.exe path, Everything tool must be running
    if(!exists("%temp%\EFS\")) {new("%temp%\EFS", "dir")}                    // Make sure the path exists
    $txt = "%temp%\EFS\" . now("yymmdd-hhnn-ss.ff") . ".txt";                // Temp file path
    $content = "parent:""<newpath>"" /ad -size -no-header -export-csv";      // To search for
    run "$es $content $txt",,, 0;                                            // Run cmd

    for($i=0; $i<30; $i++) {                                                 // Read temp file
       wait 1;
       if(exists($txt) == 1) {break}
    }
    wait 10;
 
  if(exists($txt) == 1) {
     $EVsizeResults = readfile($txt);
     perm $EVsizeResults, $EVcase = $EVcase+1;                  // Global variables
  }

    if($EVcase > 50) {                                                        // Clearing temp files
       delete 0, 0, "%temp%\EFS";
	   perm $EVcase = "";
    }
To -> Custom column.

Code: Select all

/*
***************************************************************************************************
@Author  : https://www.xyplorer.com/xyfc/viewtopic.php?p=210711#p210711
@Created : 2022-07-23
@Modified: 2023-05-02
@Function: EverythingFolderSize column (Calculate folder sizes via Everything tool)
@Version : v1.7
***************************************************************************************************
*/


 $EVitem = formatlist($EVsizeResults, "f", "<crlf>", "*" . "<cc_item>" . '"');
 if($EVitem) {
    return formatbytes(gettoken($EVitem, 1, ',"'), "FLEX")
 } else {
    $cc_item = regexreplace(<cc_item>, "\[|#", "*");
	$EVitem = formatlist($EVsizeResults, "f", "<crlf>", "*" . $cc_item . '"');
	if($EVitem) {
	   return formatbytes(gettoken($EVitem, 1, ',"'), "FLEX")
    } else {
    return ""
    }
 }
EV FOR XY.zip
(286.09 KiB) Downloaded 45 times
Attachments
Capture.PNG
Capture.PNG (78.06 KiB) Viewed 405 times
Win10, Win11 @100% 2560x1440 22H2

Post Reply