[Solved] es - Query size of a single folder only?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
oO0XX0Oo
Posts: 16
Joined: Sun Dec 09, 2018 3:44 pm

[Solved] es - Query size of a single folder only?

Post by oO0XX0Oo »

Hi,

es = v1.1.0.26
Everything = 1.5.0.1355a

Folder sizes are indexed
I'd like to use
es
to only the the folder size of a specific folder, not all of its subfolders as well
es.exe -size -sizeformat 1 folder:"D:\Temp" -csv -no-header


This comes close to what I want
*
but it reports all subfolders of
D:\Temp
as well
Using -n 1 doesn't work, it would list the first subfolder as well

*
The best possible output for me would be:
16972109|D:\Temp

while I currently get

Code: Select all

645727,"D:\Temp\Archives [pw & no pw]"
16972109,"D:\Temp"
so I have two additional questions:
01. Is it somehow possible to set a different separator character other than "," when using -csv (or something else?) directly on the command line?
02. Is it possible for es.exe to leave out the quoting of the foldername?

Thanks!
Last edited by oO0XX0Oo on Fri Aug 25, 2023 7:35 am, edited 1 time in total.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: es - Query size of a single folder only?

Post by NotNull »

oO0XX0Oo wrote: Fri Aug 25, 2023 6:59 am I'd like to use
es
to only the the folder size of a specific folder, not all of its subfolders as well

Code: Select all

>es.exe -size -sizeformat 1 exact:folder:"D:\Temp" -csv -no-header
oO0XX0Oo wrote: Fri Aug 25, 2023 6:59 am 01. Is it somehow possible to set a different separator character other than "," when using -csv (or something else?) directly on the command line?
02. Is it possible for es.exe to leave out the quoting of the foldername?
-csv will show results in Comma Separated Values (hence the name). -tsv is an option too (Tab Separated Values).

To get to the 16972109|D:\Temp format, you will need to do some post-processing yourself.
oO0XX0Oo
Posts: 16
Joined: Sun Dec 09, 2018 3:44 pm

Re: es - Query size of a single folder only?

Post by oO0XX0Oo »

Thank you NotNull!

I'll do the post-processing on my own then (-tsv won't really make the output more parsable) :)
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: [Solved] es - Query size of a single folder only?

Post by therube »

only the the folder size of a specific folder, not all of its subfolders as well
It appears that
es -size exact:folder:c:/tmp
does include subdirectories in its' size calculation.


Gives an interesting
es exact:folder:"c:/*" -size
output.
I'll note that a "larger" directory tree (> 99,999,999,999 bytes) throws off "layout".
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: [Solved] es - Query size of a single folder only?

Post by NotNull »

therube wrote: Fri Aug 25, 2023 3:03 pm It appears that
es -size exact:folder:c:/tmp
does include subdirectories in its' size calculation.
Not here:

Code: Select all


T:\>where es
C:\Tools\es.exe

T:\>es -version
1.1.0.26

T:\>es -get-everything-version
1.5.0.1355

T:\>es -size exact:folder:c:/temp
   908,413,938 C:\Temp

T:\>es -size exact:folder:c:\temp
   908,413,938 C:\Temp

T:\>

(Win11 btw)
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: [Solved] es - Query size of a single folder only?

Post by therube »

You do have subdirectories (with files taking up space) within c:/temp ?


---


Microsoft Windows [Version 6.1.7601]

C:\TMP\BRU>es.ex2 -instance 15 -size exact:folder:c:/tmp
60,050,811,246 C:\TMP

C:\TMP\BRU>es -size exact:folder:c:/tmp
60,050,811,246 C:\TMP

C:\TMP\BRU>es -get-everything-version
1.5.0.1355

C:\TMP\BRU>es -version
1.1.0.26

C:\TMP\BRU>dd -d c:\tmp

Code: Select all

                             NDIR.EXE, Version 2.54
Subdirectory names       │  directory            │   including subdirectories
Subdirectory names       │  in bytes │ disk space│   in bytes   │  disk space
tmp                        14,533,060│ 15,712,256    48,539,231K│   49,313,890K

Code: Select all

C:\TMP\BRU>dir c:\tmp | grep "File(s)"
             510 File(s)     14,533,060 bytes

Code: Select all

C:\000\TMP\supportTools\server>diruse c:/tmp

    Size  (b)  Files  Directory
  60050811288  451038  SUB-TOTAL: C:/TMP
  60050811288  451038  TOTAL: C:/TMP

Code: Select all

C:\DEV\Sysinternals>du  -n  c:/tmp

DU v1.62 - Directory disk usage re
Copyright (C) 2005-2018 Mark Russi
Sysinternals - www.sysinternals.co

Files:        510
Directories:  1
Size:         14,533,060 bytes
Size on disk: 16,941,056 bytes
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: [Solved] es - Query size of a single folder only?

Post by NotNull »

Oh, I misunderstood ...

Thought your ouput was like:
100 c:\folder
25 c:\folder\sub1
50 c:\folder\sub2


And yes, my C:\temp has subfolders and the size reported by Everything corresponds with the size reported by Windows (see below)
No idea why your Everything reports a larger size than NDIR. What size is reported by Explorer in your case?


2023-08-25 20_28_51-Temp Properties.png
2023-08-25 20_28_51-Temp Properties.png (66.26 KiB) Viewed 5044 times
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: [Solved] es - Query size of a single folder only?

Post by therube »

NDIR is (basically) an old DOS program.
And why its' subdirectory totals are so far different, not sure, particularly?
Maybe +H +S files or whatnot are not included by default?

Anyhow, diruse does come up with the same size (+/-, [some things may have been created/deleted in c:/tmp...]) as Everything.
And yes, my C:\temp has subfolders and the size reported by Everything corresponds with the size reported by Windows (see below)
And aren't they displaying the cumulative size of c:/temp + all subdirectories of c:/temp?


In my case, c:/tmp - no subdirectories, is using 14 MB, with subdirectories, 60 GB (which Windows Explorer also shows).
OP was looking for the particular directory size itself - exclusive of subdirectories.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: [Solved] es - Query size of a single folder only?

Post by NotNull »

therube wrote: Fri Aug 25, 2023 7:25 pm OP was looking for the particular directory size itself - exclusive of subdirectories.
Didn't sound like this to me, but might have misinterpreted this one too.

Anyway, that requires a diffrent approach. To get the size of all files that have c:\temp as their direct parent:
(requires Everything 1.5)

Code: Select all

T:\>es.exe c:\temp\* -get-total-size
813704351
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: [Solved] es - Query size of a single folder only?

Post by therube »

\*
Yes, that's got (by George), & yes \* is required to get total size ;-).

Code: Select all

C:\TMP\BRU>es c:/tmp/* -get-total-size
14533060
Post Reply