Cleaning up the mess

I’m storing quite a few of my information in my DT Pro databases, but I haven’t deleted the ‘original’ at the times. Therefore my various folders are full of redundant information and I would like to remove files stored elsewhere when they’re present in the DT Pro Database(s). A tool like Tidy Up doesn’t seem to work for this (when I would have hoped it would) as it cannot get inside a DT Pro database.

Has anyone come to write an Apple script to do this :
1/ list all files within DT Pro database and
2/ then identify those that are somewhere else on the drive ?
(possibly based on content as much as on name…)

Thanks

The first step is easy…


tell application "DEVONthink Pro"
	set theFiles to {}
	set theContents to contents of current database
	repeat with theContent in theContents
		set thePath to path of theContent
		if thePath is not "" then set theFiles to theFiles & thePath
	end repeat
end tell

…but the second step requires a lot of work. Unfortunately File Buddy has been discontinued, not sure if there are any alternatives.

Thanks for this first building block…

Dupes cleaners of all kinds exist but the one I’m using (Tidy Up) doesn’t allow to browse within the DTP database, although it does the trick for normal folder trees.

Unfortunately File Buddy has been discontinued

Just chiming in for anyone else coming late to the party to say that it looks like File Buddy is alive. https://www.skytag.com/file_buddy/

I still wouldn’t recommend a software that is rarely updated, version 10.0 was released in 2012 and the current version is from 2014 and doesn’t seem to be compatible anymore to Catalina, probably still a 32-bit app?