[Command-line] Output folder sizes also output total number of items

Have a suggestion for "Everything"? Please post it here.
Post Reply
WKen
Posts: 3
Joined: Mon May 15, 2023 5:11 pm

[Command-line] Output folder sizes also output total number of items

Post by WKen »

Code: Select all

"C:\Program Files\Everything\es.exe" parent:"F:" /ad -size -no-header -export-csv "D:\Test.txt"
This is the result of the command-line.
78038122,"D:\AHK"
1183566,"D:\Icons"
45050970867,"D:\Tools"


I expect to get the total number of all the items in the folder, for example:
116,78038122,"D:\AHK"
30,1183566,"D:\Icons"
152140,45050970867,"D:\Tools"

116 is the total number of all files and folders in the AHK folder, if speed is affected, just the total number of files is fine.
Thanks!
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: [Command-line] Output folder sizes also output total number of items

Post by void »

I am working on adding property support to ES.



For now, this information is available in the Everything 1.5 UI.

To show a child count column:
  • In Everything 1.5, right click the result list column header and click Add Columns....
  • Search for:
    child
  • Select Child Count and click OK.


To export this information:
  • In Everything 1.5, from the Tools menu, click Export.
  • Change Save as Type to: CSV
  • Choose a filename and click Save.
WKen
Posts: 3
Joined: Mon May 15, 2023 5:11 pm

Re: [Command-line] Output folder sizes also output total number of items

Post by WKen »

Thanks for the work!
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: [Command-line] Output folder sizes also output total number of items

Post by NotNull »

(C:\Program Files as example)

To get the number of objects (files/folders) below a folder -- also including subdirs -- for a folder:

Code: Select all

es.exe   "C:\Program Files"   -get-result-count
To get the number of folders below a folder -- also including subdirs -- for a folder:

Code: Select all

es.exe   "C:\Program Files"   folder:   -get-result-count
To get the number of files below a folder -- also including subdirs -- for a folder:

Code: Select all

es.exe   "C:\Program Files"   file:   -get-result-count

To get the number of objects (files/folders) below a folder -- without including subdirs -- for a folder:

Code: Select all

es.exe   parent:"C:\Program Files"   -get-result-count
To get the number of folders below a folder -- without including subdirs -- for a folder:

Code: Select all

es.exe   parent:"C:\Program Files"   folder:   -get-result-count
To get the number of files below a folder -- without including subdirs -- for a folder:

Code: Select all

es.exe   parent:"C:\Program Files"   file:   -get-result-count


All these queries give instantaneous result (milliseconds ...).

But I guess you asked because of Directory Opus integration?
There looping over folders by doing multiple ES calls will cause performance issues.
WKen
Posts: 3
Joined: Mon May 15, 2023 5:11 pm

Re: [Command-line] Output folder sizes also output total number of items

Post by WKen »

Yes, so call ES only once before browsing a folder, avoiding delays and issues.
Post Reply