EverythingFolderSize (Use Everything to calculate folder sizes)

Yes, @aussieboykie @Renaldostheold you are right... Please try out-commenting

if (beforeFolderChangeData.tab.path == undefined) return;

in the update event.

@lxp That seemed to work. Thanks.

In the alpha version, I turned off administrator rights for indexing and it works. Why would we choose administrator rights?

No idea. Works for me without them just as fine :slight_smile:

It is still not working for me without a restart of DOpus. In case it is related to something in my config I have tried in a VM using UpdateEverythingFolderSize 2023-05-02b with a vanilla DOpus 12.31 installation. Any suggestions as to what I might be doing wrong?

When I first installed it over the old configuration I needed to delete blank columns and point to the alpha version of Everything. I also deleted any older related scripts in the Add-in Folder. I reset the Everything Index by forcing it to rebuild. Taking out the line in the code then worked. Everything worked!

It then rebuilt each folder as I selected it. I haven't looked at much today.

No. But here's a modified version of the update script that will help us find out :slight_smile:

Please post or send the logs from the script and the dop2023....tmp files.

EventUpdateEverythingFolderSize.js.txt (2023-05-03)

Hello @lxp

lxp.zip (1.4 MB)

The attached zipfile contains the DOP2023 temporary files and a chronological sequence of events as captured with screen grabs which were taken on a vanilla DOpus configuration to which I added four buttons:

  1. Debug to toggle Other Logs open/closed in the utility panel.
  2. Restart to restart DOpus via DopusRT /restart
  3. EFS to toggle the EFS column on/off with Set COLUMNSTOGGLE="scp:EverythingFolderSize/EverythingFolderSize(!,a,0)"
  4. EFSEvent as per your instructions
@toggle:invert
Prefs SCRIPTDISABLE="EventUpdateEverythingFolderSize.js*,toggle"

grab1 shows the initial state of /scripts
grab2 shows the initial state of /temp
grab3 shows the log after a Restart with no EFS column displayed in either tab
grab4 shows the log after adding an EFS column to /scripts (EFS column is not populated)
grab5 shows the log after clicking EFSEvent twice (EFS column is not populated)
grab6 shows the log after a Restart (EFS column is populated)
grab7 shows the log after switching to /temp tab (no change)
grab8 shows the log after adding an EFS column to /temp (EFS column is not populated)
grab9 shows the log after clicking EFSEvent twice (EFS column is not populated)
grab10 shows the log after a Restart (EFS column is populated)

The update event can/should be left enabled all the time. The only reasons to disable it are performance problems or unwanted interference with other scripts. But it only interacts with Everything when it detects the column in the file display anyway, so just set and forget :slight_smile:

All the rest looks ok, I'd say you are good to go :+1:

My expectation may be the problem here. When I add an EFS column I expect it to populate without having to restart DOpus. Is this an incorrect assumption?

One refresh or folder change is needed after enabling the column because at this point the update event that gets the data from Everything already ran.

Aha... I see that going up a level and back to the original folder after adding an EFS column does the trick. Is there any other way of triggering a "refresh"?

Yes, Go REFRESH (usually on F5).

Sometimes the most glaringly obvious solutions are the hardest to see...... :blush:

1 Like

Is there a way to combine the EFS column with the Size (Auto) column (file size part)? I know that we can trigger the column size of the Size (Auto) column, but the speed of the EFS column is really helpful. This would save space in the Lister. Also, combining the graphical relative size column would be cool.

Alternatively, listing files sizes as part EFS column might also achieve the same thing. I am unsure if this is possible or viable. The inlayed graphical representation of relative size seems make a single column "pop".

Meaning you want the column to also display the size for files?

Replace the OnColumn function in ColumnEverythingFolderSize.js with this:

function OnColumn(scriptColData) {
    var item = scriptColData.item;
    if (item.is_dir) {
        if (item.path.drive == 0) return;
        var dirVar = 'EFS"' + item + '"';
        if (!DOpus.vars.Exists(dirVar)) return;
        scriptColData.value = DOpus.vars.Get(dirVar);
    } else {
        scriptColData.value = item.size;
    }
}

I think this is controlled by Preferences / Folders / Folder Display / Show relative graphs behind size columns and only applies to built-in size columns. Would definitely be nice to have that feature available for custom columns as well, I agree.

1 Like

@lxp Thanks Alexander, this worked like a charm. Thank you very much!

Hello, Alexander. When i sort lister by EverythingFolderSize-column, click on a folder and go back to parent, sometimes my focus goes mad and runs away to the end of lister. not on any folder!!!
turning off reset focus in setting doesn't help. any ideas to fix?

EFS trouble

Sorry, the script doesn't work for me. The column stays empty after F5. Maybe the problem lies here:

Quote: "pick the right var exeES = ... line in the script" *

I have no such line in either of both scripts. Es.exe is present in the Everything 1.5 folder, alpha_instance is set ok, indexing folders is also set in Everything, so what else could be the reason?

** If i try to use the forum software's quote function for those few words above, it extends the quote to lxp's whole posting. Is that intended?

Try.

Enter the path in the script.

1 Like