Option: delete folder and/or path when it becomes empty

Discussion related to "Everything" 1.5 Alpha.
Post Reply
eswul62
Posts: 130
Joined: Wed Jul 31, 2013 6:07 am

Option: delete folder and/or path when it becomes empty

Post by eswul62 »

When deleting one or more files within Everything and the folder becomes empty, it may be that the folder is not necessary anymore, even not the path. Often when it involves old or duplicate files.

Just as a suggestion: maybe add an option to remove folders (or paths) as well, when they become empty?

I may be overlooking it, but I believe it is not available right now(?)

thanks.
void
Developer
Posts: 16776
Joined: Fri Oct 16, 2009 11:31 pm

Re: Option: delete folder and/or path when it becomes empty

Post by void »

Everything will not automatically delete empty folders.

I will consider an option to automatically delete empty folders after performing a delete operation.
Thank you for the suggestion.



For now, please include the following in your search to find empty folders:

empty:
eswul62
Posts: 130
Joined: Wed Jul 31, 2013 6:07 am

Re: Option: delete folder and/or path when it becomes empty

Post by eswul62 »

As always: thanks a lot.
therube
Posts: 4985
Joined: Thu Sep 03, 2009 6:48 pm

Re: Option: delete folder and/or path when it becomes empty

Post by therube »

There are times I'll empty a directory & then manually go back (via File Manager or Everything or otherwise) & delete that empty directory, but the "it may be that the folder is not necessary anymore" part of it, that to me, makes it a no go option.

How would "it" (Everything) know that this time you do want to delete said empty directory, & next time you don't want to?
(Oh, I know, "AI" will tell it ;-).)


As it is, Everything can easily find "empty" directories or directory trees & prune such.

Remove Empty Directories
eswul62
Posts: 130
Joined: Wed Jul 31, 2013 6:07 am

Re: Option: delete folder and/or path when it becomes empty

Post by eswul62 »

Sorry for getting back on this, after months only.
Reason: I was again busy cleaning up/deleting duplicate files from within Everything and I remembered having posted this thread.

So, Everything:
Search for X:\ dupe:dm
(sort on modified date)
now delete duplicates files with the same modified date '
(delete for instance files with shortest file name)

whilst deleting folders may become empty.

My suggestion:
Enable a (new) option that Everything will ask whether or not to delete the folder.
Something like "Delete empty folder: x:\folder\sub folder\sub sub folder?" [Yes/No]
Or
"Folder X:\... etc. is empty"
Delete it? [Yes/No]

The idea is that Everything would then delete only the folder(s) that became empty after such action, but leave any other empty folder, somewhere else on the system, untouched.

All that said, I don't know if it is workable, maybe it is too complex.

Reason I often prefer to use Everything to delete duplicates is that it finds such 'simple duplicates' instantly.
Duplicate files finder tools are usually fairly slow, launch, click-click-click selecting folders. They usually calculate hashes and so on.
Often there is no need to do all that (hashes): you know that files are duplicates because of a wrong copy action, with file renaming afterwards.
void
Developer
Posts: 16776
Joined: Fri Oct 16, 2009 11:31 pm

Re: Option: delete folder and/or path when it becomes empty

Post by void »

Thank you for your feedback eswul62,
Enable a (new) option that Everything will ask whether or not to delete the folder.
Something like "Delete empty folder: x:\folder\sub folder\sub sub folder?" [Yes/No]
Or
"Folder X:\... etc. is empty"
Delete it? [Yes/No]
I will consider an option to prompt to delete empty parent folders when deleting files/folders.

Thank you for the suggestions.



For now, please try the following search:

x:\ empty:
Post Reply