filter totally empty folders

Discussion related to "Everything" 1.5 Alpha.
Post Reply
sk2107
Posts: 296
Joined: Sun Aug 07, 2022 8:48 pm

filter totally empty folders

Post by sk2107 »

Hello,

How can I filter the folders which are totally empty with no files in them (sometimes folders could contain Zero files size which are put for a reason and shouldn't be deleted).


Thank you.

Regards
NotNull
Posts: 5354
Joined: Wed May 24, 2017 9:22 pm

Re: filter totally empty folders

Post by NotNull »

(moved to Everything 1.5 forum)

Everything has an empty: search function that does just that: showing folders without any files or folders in them.


But to be more secure, I use a different search query:
As Everything works from a database, there might be differences between what Everything sees and what the reality looks like.
(but I must say that Everything does a good job in being up-to-date).
I also exclude reparse points ("links" to other folders). With all that, this is what I use:

Code: Select all

empty:   child-file-count-from-disk:0   child-folder-count-from-disk:0   !attrib:L
sk2107
Posts: 296
Joined: Sun Aug 07, 2022 8:48 pm

Re: filter totally empty folders

Post by sk2107 »

I will try that.

thanks a lot.

Best regards
NotNull
Posts: 5354
Joined: Wed May 24, 2017 9:22 pm

Re: filter totally empty folders

Post by NotNull »

You're welcome!

Just realized that for offline folders, size-from-disk can not be measured.

Luckily you can't delete folders on offline media, so impact is minimal.
However, to be on the safe side: version 2 ....

Code: Select all

empty:   online:   child-file-count-from-disk:0   child-folder-count-from-disk:0   !attrib:L

sk2107
Posts: 296
Joined: Sun Aug 07, 2022 8:48 pm

Re: filter totally empty folders

Post by sk2107 »

Yes I got that.

thank you

Best regards
therube
Posts: 4713
Joined: Thu Sep 03, 2009 6:48 pm

Re: filter totally empty folders

Post by therube »

(Dated at this point, so don't know if the part dealing with hard links still applies ?, but... Remove Empty Directories.)
Post Reply