- Index folder size.png (22.14 KiB) Viewed 352 times
- EFS.PNG (16.26 KiB) Viewed 352 times
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 = "";
}
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 ""
}
}