mass delete broken attachments?

HI there, I have thousands of broken attachments thanks to a merge gone wrong. I have used the storage scanner plugin to identify them, but now I'd like to actually remove them. Is there a way to do that other than going through and deleting each one?
  • I'm not sure I understand. You can delete any set of multiple items in Zotero simply by selecting them and deleting them. Could you say more specifically what you're having trouble with?
  • It's an onerous task to go through thousands of entries, select just the pdfs and delete them. I'm looking for a tool that would remove all pdfs with broken links .
  • I'm not sure exactly how the storage scanner plugin works, but if it sets a tag on the broken attachment items, you can just filter for that tag and do a Select All to select all matching items, and then delete them.
  • It doesn't currently tag the attachments themselves but that should be easy to add.
  • No wait, it does tag the attachments. #broken_attachments should pick out all attachments that I inspected.
  • I don't want to delete the *items*, just the broken attachments.
  • According to emilianoeheyns latest post, the tag should just select attachments. Note that parent (and sibling) items will still be displayed, but greyed out and not be affected by any operations such as select all + delete
  • It's not working on my end. The tag #broken_attachments filters my library to return all items with a broken attachment. But deleting those requires individually selecting each broken attachment and deleting it. It's not really feasible in a large library.
  • Have you tried pressing ctrl+a (cmd+a on Mac)? Does that really show items selected? If so, do you see the broken_attachments tag on the parent item as well? In that case, this may require some advanced search tinkering, but if only the attachments have that tag, the tag filter alone should really work.
  • Beautiful!!!!!
    For anyone coming by here in the future:
    1) Storage Scanner creates takes for broken attachments and duplicate attachments.
    2) Selecting #broken_attachments filters items that have, duh, broken attachments.
    3) Selecting *1* of those broken attachments, then selecting cmd+a (mac and presumably ctl+a, pc) appears to select all the broken attachments, which you can then delete with one keystroke.

    Thanks!
  • edited February 29, 2020
    where "duplicate" is very, very basic -- it just gets that tag if the parent item has two attachments of the same file type. I do no kind of content or filename inspection. My own use for it is to find post-merge items with now-duplicate attachments.
  • Beautiful indeed skiss. It helped me a lot, with my 2000 damaged extensions.

    Marcelo
Sign In or Register to comment.