Search for broken links / attached files that can't be found?

I've recently come across several attached files in my database that have been lost. I receive the error message: The attached file could not be found....

Is there any way to run a check of the zotero database and output a list of all the files that are no longer linked to the database?

I keep all of my files in a separate folder, and create links from the database to attach them (with the exception of web snapshots, which are kept in the zotero folder). I'd love to have a log or text file of all the problem files.

Thanks,
Jon
  • edited July 26, 2011
    Here's a useful thread: scan for missing attachments. Including a script by krueschan which I haven't tested for a long time, but which might still work. Though I'm not sure whether it can handle linked files as opposed to attachment. Also see this ticket.

    This does underline the need for a better solution though. I've been particularly annoyed with the fact that Zotero does not reveal the folder (random string) it is looking for when it misses an attachment. Because I found that in some cases these folders actually do contain a copy of the PDFs (autorenames gone wrong I suspect). I guess that's the debris that accumulates in a four year old library, but it is somewhat unsettling that we lack good ways to clean up.

    A simply log file would already be good. Perhaps the "tool" word makes it sound like a fully fledged application, but I know many users would be happy with a simply log file of problems, similar to what is done on a database upgrade.
  • I agree that the file path Zotero searches should be displayed in the "file not found" message. (I believe you can see it in the debug output if you're really desparate).
  • I think this could be scripted in Python, building off of Gnotero's libzotero, fairly easily. For the Python-literate and interested, see Sebastiaan's intro.
  • I've been particularly annoyed with the fact that Zotero does not reveal the folder (random string) it is looking for when it misses an attachment.
    If the folder exists, the Locate button puts you in it.

    A built-in way to identify missing files will happen at some point.
  • It would be great to have a built-in way for Zotero to do a check of the database and provide a transcript. I'm python illiterate and hope to remain so.

    Thanks.
  • Bump,
    Is there a tool to remove all missing attachments?
Sign In or Register to comment.