How to find and delete empty folders?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
JimmyTheBroker
Member
Member
Posts: 179
Joined: 2017-06-07, 05:22 UTC

How to find and delete empty folders?

Post by *JimmyTheBroker »

Hi guys,

I have a project I am workign on. there are lots of sub-directories.
Some of them are empty folders.
Would you have any idea how i can find these all and delete them?

Thanks!
Jimmy 8)
I finally get notifications from emails again!!!
So happy!
User avatar
tuska
Power Member
Power Member
Posts: 3741
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

1.   Plugin dirsizecalc required
1.1 Alt+Shift+F7 (search in separate window of TC)
1.2 Search in: check path, search in subdirectories: check depth, e.g. all (unlimited depth)
1.3 Plugins - tab: Tick "Search in plugins:", choose plugin "dirsizecalc", property: Empty, OP: =, Value: Yes
1.4 click on "Start search", then "Feed to listbox"
1.5 type in cm_SelectAllFolders in TC commandline
1.6 press Delete key
1.7 press Ctrl + R (Reread Source)
1.8 close separate "Find Files"-window

OR

2.   'Everything' required
2.1 Alt+Shift+F7 (search in separate window of TC)
2.2 Search for: ed:empty:
2.3 search in: check path, 'Everything' must be ticked(!), search in subdirectories: check depth, e.g. all (unlimited depth)
2.3 continue with pt. 1.4

OR

3.   TC required (only) --> not recommended! (see Dalai's post below)
3.1 Alt+Shift+F7 (search in separate window of TC)
3.2 Search in: check path, search in subdirectories: check depth, e.g. all (unlimited depth)
3.3 Advanced - tab: tick "File size:", choose '=' (default), type in: 0, choose: bytes (with dropdown-arrow)
3.3 Advanced - tab: tick "Attributes:", tick "Directory" (double-click on this field)
3.3 continue with pt. 1.4

-------
EDIT: Added under pt. 3. "--> not recommended..."
Last edited by tuska on 2018-02-07, 10:00 UTC, edited 1 time in total.
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

2tuska
Variant 3 is not a safe way in this case, because there can be an unlimited number of files of 0 bytes in size inside a directory and the directory still has a cumulative size of 0 bytes.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
tuska
Power Member
Power Member
Posts: 3741
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

2Dalai
Thanks for this important information!

Regards
Karl
User avatar
JimmyTheBroker
Member
Member
Posts: 179
Joined: 2017-06-07, 05:22 UTC

Post by *JimmyTheBroker »

Tuska,

would I be correct in saying that, if I am searching for files on a network that the "Everything" method would not work?
(As in, files not located on the local machine)
I finally get notifications from emails again!!!
So happy!
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

JimmyTheBroker wrote:Tuska,

would I be correct in saying that, if I am searching for files on a network that the "Everything" method would not work?
(As in, files not located on the local machine)
Correct.
It will only work if you have Folder indexing set for this Network resource in Everything
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
tuska
Power Member
Power Member
Posts: 3741
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

JimmyTheBroker wrote:Tuska,

would I be correct in saying that, if I am searching for files on a network that the "Everything" method would not work?
(As in, files not located on the local machine)
No, that should be possible in my opinion, but I have not tested it myself.

But there may be other basic requirements to consider, such as administrator rights, folder indexing, show_tray_icon=, etc.
Some thoughts on this topic can be found here.

You could also search the voidtools forum if you have further questions.
Post Reply