Is there a systematic way to find big attachment files in a Zotero collection?

I have been using Zotero for almost 10 years, and my collection is growing quite big (5+GB). Partially because of costs related to cloud storage, partially because adding new items is getting slower, I would like to free some space.

Removing old items and placing it in a separate backup, or even a separate Zotero standalone installation is perhaps a way to go, but before proceeding in that direction, I would like to see if there is a way to find which items have big attachments. Ideally, this would be an option in the search function that allows me to choose, e.g., all items with an attachment larger than 10MB.

Anything to the same effect would be welcome.

I can use software to analyse diskspace, see the big files, then go back to zotero, and one by one go through them and decide what to do with them.

But isn't really any easier way?

I can also imagine a script that checks folder size, and lists files or Zotero items ID with big attachment... but how can then that be provided as an input for a search in Zotero, so that I can go through the results more effectively?

That would still be probably a temporary solution, but may still be a useful step in getting me through the next few years (and by then, storage and speed may be less of an issue).

thanks!
  • Once you've identified the folder a large file is in -- be it via a disk space analyzer or a script -- you can post the alphanumeric string into the quick search bar in Zotero in "All Field and Tags" mode and it will show the item, which you can then delete.

    As you say, this still isn't super fast, but afaik that's the best there currently is.
  • I see, that's what I've been doing myself so far. But that's actually super-slow. It's ok if you're looking to get rid of n<10 files, but that's not a very systematic way of dealing with this.

    thanks!
  • I forgot to make reference the solution I found to my own original post. I created an R package that facilitates doing all of the above. Instructions on how to achieve this:
    https://github.com/giocomai/zoteror

    The package is far from complete, but works well to deal with this.
  • Interesting discussion, this was also something I was looking for. However, I was interested in large files in a shared group library. On the file system, it seems to be impossible to tell which library a file belongs to.

    I found a way by using the "BetterBibTeX JSON" export from the BetterBibTeX addon, as it includes file paths for attachments. So I could export the library I wanted to investigate and run a small python script on the JSON file:

    https://gist.github.com/frederik-elwert/5930d3c886080e245b2f7d1532c84478
  • I'm not that much of a coder, so that's beyond what I'm able to tinker with. I just want a column in the Library view, or even if it added the file size value to the Info or Notes tab. Any chance of this feature Team-Zotero?
Sign In or Register to comment.