Removing Duplicates

I monitor the profitability of number of stocks. Each company has a folder. The folders are inside a folder called Portfolio.

I read the financial columns and save any web pages of interest.
I normally save everything to the parent folder (Portfolio) and later, when I have more time, I move the downloads into the sub-folders. If a web page has news about more than one company I put a copy in the sub-folders of each company affected.

If I am rushing I sometimes (erroneously) COPY from the parent folder instead of using MOVE.
Over time the Portfolio folder accumulates a lot of files, some new and some which should no longer be in there.

I want to use Find Duplicates to remove the files that should no longer be in the parent folder, but I don't want to see a list of duplicates showing files which are only in the sub-folders.

Is there any way to do this?

Why would there be duplicates only in the sub-folders? If you'd moved the files instead of copying them they'd only exist in the sub-folders and so presumably wouldn't have a duplicate anywhere else.

He must have edited his post after you replied, Jon, because your question no longer makes any sense when reading the original post.

@66320 If you did edit your post after Jon replied, please refrain from doing that as a means of replying. Instead, write a reply to his reply...or you can edit your post and then post a reply saying, "Fixed my original post". If you don't reply, the thread will not show up in the "Latest" or "New" lists because there was no new activity.

I did not edit my post as a means of responding to Jon, I have only just seen his reply.

I would still welcome any ideas on how to compare files in a parent folder with files in several sub-folders without comparing the sub-folders with each other, as there are intentional copies in more than one sub-folder.

My reason for wanting to do this is that there are a large number of files and I don't want to have to go through the duplicates list manually.

Well, then, I don't understand Jon's reply. Your post only asks how to remove files in a parent folder when there's a duplicate of that file in any of number of sub-folders below the parent.

So you want to find all files directly below the main folder, which are also below one of the sub-folders?

You could run the duplicate finder on the main folder to get a list of all duplicates below the main folder, and then remove all the duplicates which are in sub-folders.

You can use Edit > Select by Pattern > Advanced, and then something like this to match anything in a sub-folder of (in this case) C:\Users\Leo\Desktop\New Folder:

Then right-click and choose the option to remove them from the collection.

At that point, you'll be left with only the duplicates which are directly below the main folder.

Of course, this may include files where the only two copies are both in the main folder and no copies are in any sub-folders.

If I understand him correctly, he wants to delete the file I have highlighted and leave the two inside the sub-folders.

image

The easiest thing would be to group the results list by the location field. Then all the files he presumably wants to delete will be in the same group.

1 Like

Many thanks to all three of you. Leo's idea did produce the desired result. It let me highlight all the files I wanted to retain, then use Remove From Collection. What remained were only the duplicates in the parent folder, which I could then delete in one go.

I thought it might be even quicker to use Find Duplicates with a filter (see screenshots), but for some reason I don't understand this did not work.


(the two highlighted files in the parent folder are what a want to delete)


(screenshot shows filter returned no results)

I appreciate the help you, Jon and DesertDwarf have given, and am impressed by the endless capabilities of Dopus.!

Jon's suggestion of grouping is probably even quicker than my one.

Using a filter won't work as it would exclude everything in the sub-folders during the search for duplicates. If something is only a duplicate because it's in the main folder and also a sub-folder, and the sub-folders are ignored, then it won't be seen as a duplicate.

I have just tried Jon's idea and you are right, it is very a easy solution.

Just upgraded to V13. Im quite surprised there isnt a better front end showing the duplicates and then just having a few easy gui buttons to copy/delete/move the files either from location 1 or location 2. i dont think it would be that much more effort to provide this.

Selecting duplicates by location was greatly improved in Opus 13.

If you want something in addition to that, please give details.