EverythingFolderSize (Use Everything to calculate folder sizes)

Oops. Yes. Fixed!

1 Like

The process is quite intransparent, let me try and help you. First, you open this post as reference:

What you do (as far as I understand it and it's working flawlessly for me now) is the following:

You download the item under 'Download Everything Command-line Interface', this gives you the es.exe you need to then put into Program Files/Everything:

You make sure Everything is running, I suggest you activate Everything as a service if you haven't already (you can use this method with either 1.4 or 1.5 alpha, you just have to make sure only one instance is running and you have alpha_instance=0 set in everything.ini.

Now you download the two text files Ixp attached above and put them in the posted folder 'Script AddIns'.

Then right click on DOpus title par and activate customize mode through 'Customize...'.

Righ-click on the toolbar and select either 'New -> New Button' or 'Insert New -> New Button' depending on where you click.

Create two different buttons. Right-click on each button and click 'Edit...', click 'Advanced...', pick 'Script Function' under 'Function', select 'JScript' under 'Script Type' and replace the text below with the content of the two green code boxes above. Then you can remove the buttons from the toolbar (I clicked them once, but I don't think you have to do that, it's just to add the code to DOpus' DB). Deactivate customize mode.

Now you can right-click on the columns and tick 'EverythingFolderSizeVars' under 'Columns -> Script' and voilà (I changed the label of EverythingFolderSizeVars, so the column isn't too wide). Now you can optionally add the XML buttons to toggle visibility and refresh or you just leave the column activated permanently.


Thank you for trying to help me.

I have Everything 64-bit installed and running as a service. It works fine as I am able to use the Everything GUI to filter the file list as expected.

I have copied the es.exe file into the Program Files\Everything folder.

There is no alpha_instance=0 present in the everything.ini file.
I see only

I added alpha_instance=0 also, but it made no difference.

I have downloaded and put the scripts into the
\AppData\Roaming\GPSoftware\Directory Opus\Script AddIns folder.
I noticed they have a .js.txt extension, I even tried changing the extension to just .js, but still no go.

I have created the buttons by pasting in the XML shown above.
The show/hide column button works as expected.

The UpdateEverythingFolderSize button however does nothing.

As an aside, after installing Everything last night, my machine hung instead of going to sleep like it normally does when I finished for the day... It normally never does this. Everything is the only new software I installed yesterday.

Both are ok

Is the column empty or are the values zero?

All it does is toggle this check box:

Before, when I mistakenly had
var exeES = fsu.Resolve('c:\program files\Everything\Everything.exe');
it was zeros.
When I corrected it to
var exeES = fsu.Resolve('/programfiles\Everything\es.exe');
it's empty

You are looking at the correct column EverythingFolderSizeVars, right?

Please uncomment line 26 in EventUpdateEverythingFolderSize.js

// DOpus.Output(cmdLine);

You should then see something in the logs when changing or refreshing the tab.

Oh, I'm sorry, you only need the alpha_instance=0 if you're using 1.5 alpha of Everything. You have to copy the cli.c with the es.exe, you probably forgot that. When I rename cli.c, I also get 0s as a result. EDIT: Never mind, I had the Refresh button disabled, that's why it didn't work without cli.c. :stuck_out_tongue: Maybe you have that disabled somehow?

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

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

"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


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.


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.