Decluttering and consolidating

Anyone have the slightest idea as to how I would design this process within the Smart Rules syntax available?

  1. Find all duplicates
  2. Create Replicants in all folders with duplicates
  3. Move all duplicates to trash
  4. Find all folders with more than single instance of given replicant
  5. Move all redundant instances of replicant in folder to trash

I can’t, off the top of my head, come up with how you would do this with a smart rule. But: by default there is a smart rule called “Filter Duplicates” - it will show you all duplicates (don’t run it - it would move your duplicates to trash). In the Data menu there is a function Convert/Duplicates to Replicates. So that should deal with 1-3 on your list (mark those files listed by the rule, and then select the aforementioned function in the menu).

Be aware, though, that you cannot replicate across databases; you can only duplicate across databases.

Without scripting* I couldn’t automate your points 4 and 5; if you don’t have thousands of replicates, the easiest way would be to duplicate the “Filter Duplicates” smart rule, change “Duplicates” to “Replicates” in the rule, add “location” to the columns in the View menu, and then simply go through the list manually, marking those instances which are to be deleted.

* even scripting would be relatively complex, because you aren’t looking to remove all duplicate instances of replicants, but only those multiples in the same group. @pete31 you haven’t got a script of this kind hidden away already?

It’s not usable in smart rules but Data > Convert > Duplicates to Replicants will perform the first 3 steps and won’t create redundant replicants, therefore step 4 & 5 should be unnecessary.

I’ve tried both of those solutions thus far. Working through the various inter-related subject material and ensuring that the stuff is able to be cross-checked against one another left my databases bloated and clunky.

Having exported my databases into files and folders in order to consolidate all the various smaller ones into a single master-database, I then moved everything into a home database before beginning to work through the various exported folders. Hence the complexity of the request.

Thus far, I’ve been able to make use of Smart Group “Duplicates” which looks through the whole of the database and filters duplicates in order to run the “Convert Duplicates to Replicates” command.

I’ve also been able to make use of a “Remove Duplicates on Import” Smart Rule to remove any new duplicates being imported from the previous Export folders as I slowly reorganize the database’s file structure.

I’ve just run into myriad replicates within the same folders and I was hoping to be able to automate the whole process, rather than having to individually select each replicant as I come across it

I just created a document and 3 duplicates, moved all of them to a different group and finally selected all 4 items in the Duplicates smart group and uses Data > Convert > Duplicates to Replicants but no unnecessary replicants were created.

Could you please provide any additional details to reproduce this? Thank you!

As I mentioned, this was part of a rebuild of my database, so I think the best test would be as follows:

  1. Export files and folders (one should suffice for test purposes)
  2. Re-import files and folders (sans any smart rules that would immediately move duplicates to trash)
  3. Create “Duplicates” Smart Group
  4. Convert Duplicates to Replicates
  5. Bask in the full glory of a folder full of Replicates in one folder, amidst the various other Replicates in other folders placed for cross-reference purposes

Everything still looks as expected so far. What exactly did you im/export in step 1 & 2?

Exported the whole of all my databases into files and folders
Screen Shot 2021-02-23 at 1.58.09 AM

In the process of rebuilding I set it aside while working on other things before returning.
Screen Shot 2021-02-23 at 2.04.49 AM
Screen Shot 2021-02-23 at 2.06.49 AM

These are just random inoffensive screenshots of some of the folders I’d been importing.

In continuing with the rebuild, I needed to import the folders and files into the newer versions of themselves, which resulted in the duplicates and replicates that began to be criss-crossed as the rebuild continued.

Perfect example here, is the doubling of the documents with these text review notes

I’d been going through them row by row but this was a good example. These are also not showing up in the duplicates Smart Group

My replicates group is, expectedly, relatively largeScreen Shot 2021-02-23 at 2.18.08 AM

but I don’t know of a means by which to automate moving only replicates within the same folder into trash while leaving any replicated into different folders for cross-reference in place without going through them individually

Did you rebuild the database via File > Rebuild Database…? Or did you ex/import everything on your own?