- Index folder size.png (22.14 KiB) Viewed 462 times
- EFS.PNG (16.26 KiB) Viewed 462 times
Code: Select all
/*
***************************************************************************************************
@Author : https://www.xyplorer.com/xyfc/viewtopic.php?t=24909
@Created : 2022-07-23
@Modified: 2024-04-01
@Function: EverythingFolderSize column (Calculate folder sizes via Everything tool) Configuration | General | Custom Event Actions | Before browsing a folder
@Version : v2.0
***************************************************************************************************
*/
$EVsizeResults = "";
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_EFS = "%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_EFS",,, 0; // Run cmd
wait 100;
}
perm $txt_EFS, $EVcase = $EVcase+1, $EVsizeResults; // Global variables
Code: Select all
/*
***************************************************************************************************
@Author : https://www.xyplorer.com/xyfc/viewtopic.php?p=210711#p210711
@Created : 2022-07-23
@Modified: 2024-04-01
@Function: EverythingFolderSize column (Calculate folder sizes via Everything tool)
@Version : v2.0
***************************************************************************************************
*/
if (!$EVsizeResults && exists($txt_EFS) == 1) {
perm $EVsizeResults = readfile($txt_EFS)
}
if (!$EVsizeResults) {return}
$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
}
}
Code: Select all
if ($exec != 1) {
perm $exec = 1, $EVsizeResults = "", $txt_EFS = "";
status "EFS off!";
if ($EVcase > 50) { // Clearing temp files
delete 0, 0, "%temp%\EFS";
perm $EVcase = "";
status "EFS off! (Cache cleared)";
}
} else {perm $exec = 0; status "EFS on!"}