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
How to find and delete empty folders?
Moderators: white, Hacker, petermad, Stefan2
- JimmyTheBroker
- Member
- Posts: 179
- Joined: 2017-06-07, 05:22 UTC
How to find and delete empty folders?
I finally get notifications from emails again!!!
So happy!
So happy!
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..."
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.
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
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
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- JimmyTheBroker
- Member
- Posts: 179
- Joined: 2017-06-07, 05:22 UTC
Correct.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)
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.3593)
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
No, that should be possible in my opinion, but I have not tested it myself.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)
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.