how to find duplicates?

How does one find all the duplicates of a given item?



Christian – thanks, I should have been clearer.

I want to Find, not “Find & Remove Similar Contents”.

I see now that Eric Oberle wrote a “reveal replicants” script (pulling some code from scripts you wrote) that performs the analogous task for replicants. (Thanks, JRPars, for posting that on viewtopic.php?f=3&t=5973)

I looked on “Useful Scripts from Our Users” page. ( … ripts.html) to see if someone had already done a “reveal duplicates” version of Eric’s script, but don’t see it there.

Which leads me to ask what I’m sure has an obvious answer – given that many scripts have been posted to these fora but only a few have made it to your Useful Scripts page, is there some simple way to collect the scripts or pointers to discussions of them?

Also, are there other places where excellent DT scripts are deposited?


Found this in thread from 2006. Don’t know if it will do what you want, but just in case:

– Find Duplicates.
– Created by Christian Grunenberg on Mon Apr 24 2006.
– Copyright © 2006. All rights reserved.

tell application “DEVONthink Pro”
set theDuplicates to every content of current database whose number of duplicates is greater than 0
if (count of theDuplicates) is greater than 0 then
set theGroup to create record with {name:“Duplicates”, type:group}
repeat with theDuplicate in theDuplicates
replicate record theDuplicate to theGroup
end repeat
end if
on error error_message number error_number
if the error_number is not -128 then
display alert “DEVONthink Pro” message error_message as warning
on error number error_number
if error_number is -1708 then display dialog error_message buttons {“OK”} default button 1
end try
end if
end try
end tell

JRPars – I see that script does part of the job. But, even better, thanks to your effort, I now see that Christian, when he posted that script, preceded it with the comment:

That will work just fine.

Thanks to both of you.