Find DT entries with missing files

I was wondering whether there is any way (via Applescript or not) to find all DT entries that have their file missing?

I often rename PDFs using Bookends, which I also use to organise folders of PDFs which are then indexed by DT. Unfortunately this often leaves me with a bunch of DT entries with missing files. Is there a way to hunt these down? I can’t figure it out. An applescript perhaps (I’m afraid I have no skills in this regard)?

If you run Tools > Verify and Repair then look at Window > Log, you should find the list you’re looking for.

Thanks, but when I run Verify and Repair I get a ‘no errors found’ dialogue and no entries in the log, despite having lots of entries with missing files…

Ah … I see. Simplest thing, perhaps, is to reindex those folders.

Otherwise, try this:

tell application id "com.devon-technologies.thinkpro2"
	repeat with thisItem in (selection as list)
		set thisPath to (path of thisItem as string)
		tell application "Finder" to if not (exists thisPath as POSIX file) then
			display dialog "File does not exist: " & thisPath
		end if
	end repeat
end tell

great, thank you, I’ll keep that handy, though you’re right; probably best just to reindex (rather a long job unfortunately).

Would be great if devs found a way to get missing files collected via a smart folder, but I can see why its not a priority…

That script could be adjusted and made into a triggered script that runs whenever you click the top level folder of your indexed group structure.

I’ll try doing that then. thanks!