EverythingFolderSize (Use Everything to calculate folder sizes)

OK, before checking the connection between ES.exe and Directory Opus, let's start with the connection between Everything and ES.exe:

  • Start Command Prompt from the start menu (cmd.exe)
  • Copy the code below to the clipboard (use the button in the upper right corner of the codeblock)
  • Paste it in the Command Prompt window
"C:\Program Files\Everything\es.exe" -version
"C:\Program Files\Everything\es.exe" -geteverythingversion
"C:\Program Files\Everything\es.exe" count:3 everything
"C:\Program Files\Everything\es.exe" count:3 everything -exportcsv "%temp%\output.deleteme"
type "%temp%\output.deleteme"


  • Copy the output to the clipboard
  • Paste it here for further inspection

BTW: What Everything version are you using?



cli.c is not needed.

1 Like

I may be wrong, but does it make sense to use ET for determining the size of a folder when ET did not index all files within, because of filters or omitted results?

"C:\Program Files\Everything\es.exe" -version
1.1.0.26

"C:\Program Files\Everything\es.exe" -geteverythingversion
1.4.1.1022

"C:\Program Files\Everything\es.exe" count:3 everything
E:\nnnn_Backups\nnnnnn nnnnnnnnn\nnnnn nnnn\nnnn\nnnnn nnnnn OneDrive\OneDrive\Documents\nnnnnnnnnn\AppData\Roaming\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys\#barbie.everythinggirl.com
W:\nnnn_nnnnnnn\nnnnn nnnnn nnnn\Desktop\Recovered\Documents\nnnnnnnnnn\AppData\Roaming\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys\#barbie.everythinggirl.com

*replaced personally identifiable names with nnnn

yes

OK, I did that. This is the text I found in the Script Output.txt file.

26/04/2023 19:12 UpdateEverythingFolderSize: "C:\Program Files\Everything\es.exe" -size -no-header -export-csv "C:\Users\nnnnnnn\AppData\Local\Temp\dop202304261812200832.tmp" -parent "W:\nnnn_nnnnnnn\nnnnn nnnnnn" /ad

And the following is the contents of the .tmp file mentioned above:

,"W:\nnnn_nnnnnnn\nnnn nnnnnn\Desktop"
,"W:\nnnn_nnnnnnn\nnnn nnnnnn\Documents"
,"W:\nnnn_nnnnnnn\nnnn nnnnnn\Music"
,"W:\nnnn_nnnnnnn\nnnn nnnnnn\Outlook"
,"W:\nnnn_nnnnnnn\nnnn nnnnnn\Pictures"

*replaced personally identifiable info with nnnn

That looks all fine, except for the missing sizes before the comma in each line in the .tmp file. So something's wrong with the Everything installation. I run a plain vanilla setup. The only change I recall is enabling the folder size index:

The Index folder size setting is indeed not enabled by default in Everything 1.4.
It is enabled in version 1.5 as that version is faster; fast enough to compensate for the extra "work" that has to be done.

Ahah! That was it. Seems so obvious now, but I hadn't even visited the Everything Options. It was indeed unticked. Just ticked it and let the indexes update (seemed to take less than a minute for around 10TB spread over 6 drives) and now DOpus shows the sizes for all folders. Nice.

image

Now I just need to figure out if I can use this for my Synology NAS drive...

Thanks for all the help guys. Much appreciated :beer:

Yes, I'm on v1.4. I just noticed v1.5 is in Alpha. I'll probably skip that for now as this is my main machine I use for work every day.

Thank you to those responsible for developing this handy addition to DOPUS. I managed to get it working thanks to the helpful directions posted here.

I also successfully manually moved the new column from the default end position in the lister to my preferred position and saved it. However, when toggling the column off and on via a button, the column returns to the last position. Can someone guide me on how to add a command/switch that will maintain my preferred column position? I find that placing it before the "Size" column makes sense.

I also wonder if it is possible to combine the folder size functionality with the existing "Size" column? This would minimise the number of columns and help with layout.

While I managed to change the label in the code to reduce column size, would it make it easier for new players if this was already done in the code?

The commands to add or toggle columns can position the new column relative to another one (or in a fixed position):

Screenshot of this page, which has the full details: https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Set.htm

There's also a more complex example in the default toolbars: Edit > Toggle Size Format. That uses scripting to cycle between pairs of columns while keeping them in the same place.

1 Like

Thanks Leo, I did see that page and I am unsure about the relationship between COLUMNSADD and COLUMNSTOGGLE (used in button code). I have to muddle through this as I am not a programmer.

If the column is named "Folder Size" and I want it to the left of the column named "Size" then is this correct?:

Set COLUMNSADD=Folder Size (1-Size)

If correct, how do I combine this with:
Set COLUMNSTOGGLE="scp:EverythingFolderSizeVars/EverythingFolderSizeVars(!,a,0)"
in the toggle button?

I worked it out!

Set COLUMNSTOGGLE="scp:EverythingFolderSizeVars/Folder(1-Size,a,0)"

This places the Column named "Folder" to the left of "Size"

For those having trouble with getting update button working with Everything 1.5 alpha, I discover that it works correctly when indexing is given administrative rights:

You also need the other requirement mentioned by others.

How can I change the script to substitute a shorter column heading than "EverythingFolderSizeVars"? Thanks for any directions.

2WKen

Thank very much! This was just what I needed.

Change log 2023-05-02

  • Bug fix: script doesn't skip over folders whose names contain commas.
  • Column will remain empty until it receives valid data. Previously it showed size zero.
  • Update event will only run if the column is shown in the file display to save cpu cycles
  • Changed the column's name back to its original.
  • Changed the column's header to EFS to reduce column width.
  • Consolidated the postings

An update is recommended :slight_smile:

1 Like

Running the latest 2023-05-02 code with Everything 1.5.0.1343a and ES 1.1.0.26 nothing is populated when I first toggle the EFS column on. If I then restart Opus (12.31) the column is populated. This occurs "per tab" so for each tab an Opus restart is required. Am I missing something here?

After adding the column, you should only need one refresh or folder change to obtain the values.

I am finding the same issue. No sure what has changed.