Extract metadata of damaged database to CSV?

Then downloading them again is unfortunately not possible anymore. Did you check the See Also results of the missing/reimported files?

Thumbnails are stored on their own.

Which string do you mean? Could you please post an example?

It was the same identifier that is in the DEVONtech_storage files. It was in the “log”.

It’s probably the UUID (a unique identifier) which is also readable via AppleScript.

So, anyway, I managed to use the file modification times exported in the OPML script, along with a file listing of the files from the unix “ls -lT” command, as two tables brought into Postgres that I made a view from. That view gives me the filenames and the URLs, etc. I can slice and dice that info, but what I would really like is to be able to stick those images back where they belong.

But I am still unable to merge those files back into the DB because to do that, Id need a list of all the paths for them…

Ive been unable to adapt any of the AppleScripts Ive found to give me the paths, The export csv script you made seems to not catch the last few fields for me, also it didn’t include the file path.

Its on the back burner now, because it promises to be very time consuming by hand. Luckily I do have the files. I don’t think more than a hundred or two were damaged, I can probably get them again. But getting all of them again would be impossible. Its too time consuming.

Here are two example scripts. The first one returns the paths of the selected records, the second one the paths of all images in the current database.


tell application "DEVONthink Pro"
	set theRecords to the selection
	set thePaths to {}
	repeat with theRecord in theRecords
		set thePath to path of theRecord
		if thePath is not "" then set thePaths to thePaths & thePath
	end repeat
	return thePaths
end tell


tell application "DEVONthink Pro"
	set theRecords to the contents of current database whose type is picture
	set thePaths to {}
	repeat with theRecord in theRecords
		set thePath to path of theRecord
		if thePath is not "" then set thePaths to thePaths & thePath
	end repeat
	return thePaths
end tell