Delete only folders that have all files selected within them?

The best solution for finding and removing duplicate files.
Post Reply
Gorton
Posts: 6
Joined: Wed Dec 13, 2017 12:35 am

Delete only folders that have all files selected within them?

Post by Gorton » Sun Jul 19, 2020 10:37 am

Hi,

I am wondering if there is a way to restrict a File Removal process to delete ONLY folders that have ALL files selected within them? In other words, just folders to be removed in their entirety, and do NOT remove individual files unless they belong to a folder that will be completely deleted?

Scenario:

I have a 150 GB directory that contains many subdirectories from prior backups. Each subdirectory is a separate backup. Many files and directories have been moved around and renamed in between the backups, so it's a mess. I'd like to consolidate this into the most efficient representation preserving the most recent copy of whole folders, but I don't want to partially shred any folders and leave behind orphans and remnants.

I perform a "Same Content" scan and come up with about 380,000 duplicate files in 1781 folder groups.

I can then "Mark by Modified Date/Time", selecting "Oldest files in each group".

However, I only want to delete folder groups that have all files selected. Switching to the Duplicate Folders view, I am confused by 3 things --
1) Differently highlighted folders that say, "Contained within another group".
What does this really mean? Where's the other group?
2) There is a little note in fine print on the lower right that says, "Note: Depending on your scan criteria and filters, these folders may contain other non-duplicate files."
That's what I want to avoid. How can I tell which folders will be non-empty after deleted, or not fully deleted?
3) Some folder groups have ALL folders within them appearing with a checkmark and a line through them, and no "survivor".
What does that mean?

It would be nice to have a "selection assistant" added to the Duplicate Folders tab; particularly to "Select oldest folders with no non duplicate files."

I guess I am looking for a "folder oriented" deletion process as opposed to a "file oriented" one.

Or am I just baffled, and the functionality already exists? Note, with 1781 folder groups I don't have time to click on each one... :-)

Thanks!
Gorton
Posts: 6
Joined: Wed Dec 13, 2017 12:35 am

Re: Delete only folders that have all files selected within them?

Post by Gorton » Mon Jul 20, 2020 6:04 am

I got a little bit closer to finding a solution, but not sure it will work.

After performing the content comparison and producing a list of 380,000 duplicate files, I went to the Duplicate Folders tab right away without marking any files. Entering the Duplicate Folders tab, nothing was selected.

There, I discovered a Right-Click context menu with a small selection assistant that contained one item to mark "All but one in all groups".

After doing that, some folder groups seemed properly marked, with one unmarked survivor per group.

HOWEVER, some groups had NO folders marked at all. Other groups had a few folders marked, but with more than one remaining unmarked.

Some of the unmarked folders were grayed out saying "Contained within another group", but others weren't. I still can't figure out how to determine which group the grayed out folders are actually contained in.

The program seems to try to preserve the first one listed in each group, but I would like to preserve the one with the shortest path (relative to directory path depth, not string length).

Can someone explain the confusing selection result? Thank you in advance.

I am thinking that there might be a software bug in the way that "checkmarks" get propagated to (or from) sub-levels in a directory structure, resulting in directories that should be marked, but aren't, because a file or subdirectory somehow escaped being checkmarked.

-G
Post Reply