How to find Empty Folders with conditions attached ?
-
- Posts: 94
- Joined: Fri May 28, 2021 7:55 am
How to find Empty Folders with conditions attached ?
Hi Everyone,
A belated Happy New year to All.
I would like to ask a question on finding Folders that are Empty, and deleting them?
I have done some reading on here, but not found what I wanted.
I am using "Everything 1.5.0.1295a(64)"
I am cleaning up A 10TB drive. Some of the data is rubbish and some is very important. I have been using the filter in everything to pull all the data together to do a mass delete. But I have been left with a lot of empty folders or with unwanted files in them but I wish to consider them as empty.
As an example, any folder containing the files below I would like them to be ignored and the folder to be classed as empty.
*.tmp
Desktop.ini
Thumbs.db
Could someone give me an example the syntax of how this could be done.
Empty: ????
Thank You..
A belated Happy New year to All.
I would like to ask a question on finding Folders that are Empty, and deleting them?
I have done some reading on here, but not found what I wanted.
I am using "Everything 1.5.0.1295a(64)"
I am cleaning up A 10TB drive. Some of the data is rubbish and some is very important. I have been using the filter in everything to pull all the data together to do a mass delete. But I have been left with a lot of empty folders or with unwanted files in them but I wish to consider them as empty.
As an example, any folder containing the files below I would like them to be ignored and the folder to be classed as empty.
*.tmp
Desktop.ini
Thumbs.db
Could someone give me an example the syntax of how this could be done.
Empty: ????
Thank You..
Re: How to find Empty Folders with conditions attached ?
I think I'm overlooking a straightforward solution, but the first thing that comes to mind is the following:
Breakdown:
= The folder you want to inspect and all it's subfolders.
= Report folders that have no subfolders
= regular expression search for folders that contain files that do NOT match tyhe text desktop.ini, thumbs.db and *.tmp
Note:
- MAke sure to check your Exclusions (Menu:Tools > Options > Indexes > Exclude as well as the Include Only settings of the NTFS disk(s)) because if Everything is not aware of the existence of a file, it might report a folder as empty when it is not.
- Some characters have special meaning in regular expressions ( \ ^ ( ) { } [ ] + . $ ) . If the filenames you need to specify contain those characters, please post them so we can change the query accordingly.
This will also report empty folders as those match the regex too (no files other than a possible desktop.in, thumbs.db or *.tmp)
EDIT:
Just ralized that I made a typo. Fixed.
Code: Select all
"C:\start folder\" childfoldercount:0 !regex:child:"^(?!desktop\.ini$)(?!thumbs\.db$)(?!.*\.tmp$)"
"C:\start folder\"
childfoldercount:0
regex:child:"^(?!desktop.ini$)(?!thumbs.db$)(?!.*\.tmp$)"
Note:
- MAke sure to check your Exclusions (Menu:Tools > Options > Indexes > Exclude as well as the Include Only settings of the NTFS disk(s)) because if Everything is not aware of the existence of a file, it might report a folder as empty when it is not.
- Some characters have special meaning in regular expressions ( \ ^ ( ) { } [ ] + . $ ) . If the filenames you need to specify contain those characters, please post them so we can change the query accordingly.
This will also report empty folders as those match the regex too (no files other than a possible desktop.in, thumbs.db or *.tmp)
EDIT:
Just ralized that I made a typo. Fixed.
Re: How to find Empty Folders with conditions attached ?
Happy New Year!
The safest approach to do this would be to create a file list excluding *.tmp, desktop.ini, thumbs.db, opening this file list and searching for empty:
Use Alt + Enter (Properties) to double check the folders are empty before deleting.
The safest approach to do this would be to create a file list excluding *.tmp, desktop.ini, thumbs.db, opening this file list and searching for empty:
- In Everything, search for the following:
!*.tmp !Desktop.ini !Thumbs.db - From the File menu, click Export....
- Change Save as type to EFU Everything File List.
- Choose a filename (eg: empty.efu) and click Save.
- From the File menu, click Open File List....
- Select your empty.efu from above and click OK.
- Search for:
empty: - When you are finished with the results, close the file list:
- From the File menu, click Close File List.
Use Alt + Enter (Properties) to double check the folders are empty before deleting.
-
- Posts: 94
- Joined: Fri May 28, 2021 7:55 am
Re: How to find Empty Folders with conditions attached ?
Thank You NotNull & David,
for your answers, they where much appreciated.
Maybe I could make a suggest as an option to add such a function
to everything on the menu in Search in future updates to version 1.5
Plus maybe change the colour of Empty folders to Red
to signify the folders are empty?
for your answers, they where much appreciated.
Maybe I could make a suggest as an option to add such a function
to everything on the menu in Search in future updates to version 1.5
Plus maybe change the colour of Empty folders to Red
to signify the folders are empty?
Re: How to find Empty Folders with conditions attached ?
Thanks for your reply.
For now, please subscribe to the Everything 1.5 Alpha topic (login, click the wrench at the bottom-left and click subscribe topic).
Thank you for the suggestion.
This will most likely happen in beta.Maybe I could make a suggest as an option to add such a function
to everything on the menu in Search in future updates to version 1.5
For now, please subscribe to the Everything 1.5 Alpha topic (login, click the wrench at the bottom-left and click subscribe topic).
conditional colors are on my TODO list.Plus maybe change the colour of Empty folders to Red
to signify the folders are empty?
Thank you for the suggestion.
-
- Posts: 94
- Joined: Fri May 28, 2021 7:55 am
Re: How to find Empty Folders with conditions attached ?
Thank You.
That's music to my ears,
I am a big fan of coloured Folders.
That's music to my ears,
I am a big fan of coloured Folders.
-
- Posts: 94
- Joined: Fri May 28, 2021 7:55 am
Re: How to find Empty Folders with conditions attached ?
Thank you for the links,therube.
I read some of your links before posting.
I use this alongside Everything 1.5
https://www.jonasjohn.de/red.htm
it’s a nice program, I would like to see similar
option inside Everything 1.5
I read some of your links before posting.
I use this alongside Everything 1.5
https://www.jonasjohn.de/red.htm
it’s a nice program, I would like to see similar
option inside Everything 1.5
Re: How to find Empty Folders with conditions attached ?
I don't think this was explicitly mentioned, but a couple other handy tools.
childcount:0 <-- will show you all empty folders
(edit:) empty: <-- same thing (referenced in 'Empty folders are really empty?' post above.)
folder:size:0 <-- will show you all zero-byte folders (if you have "[x]Index folder size" enabled.)
If you go through searching for files like thumbs.db, desktop.ini, *.tmp, and delete them all, you can then use the above searches to find folders that are now empty since those files were deleted.
childcount:0 <-- will show you all empty folders
(edit:) empty: <-- same thing (referenced in 'Empty folders are really empty?' post above.)
folder:size:0 <-- will show you all zero-byte folders (if you have "[x]Index folder size" enabled.)
If you go through searching for files like thumbs.db, desktop.ini, *.tmp, and delete them all, you can then use the above searches to find folders that are now empty since those files were deleted.
-
- Posts: 94
- Joined: Fri May 28, 2021 7:55 am
Re: How to find Empty Folders with conditions attached ?
Thanks, for your info: raccoon.
Funnily enough I was just reading up on
childcount:0
folder:size:
I am educating myself on the syntax used in Everything 1.5.
As I am still a novice with this software.
Funnily enough I was just reading up on
childcount:0
folder:size:
I am educating myself on the syntax used in Everything 1.5.
As I am still a novice with this software.
Re: How to find Empty Folders with conditions attached ?
as a pointer, not all touching syntax is necessarily required to be touching, but just aesthetically pleasing, while other syntax must be touching-combos.
folder:size:0 is the same as folder: size:0 and size:0 folder:, as both terms assert themselves independently.
folder:size:0 is the same as folder: size:0 and size:0 folder:, as both terms assert themselves independently.