Bulk Editing in Zotero

edited June 19, 2024
Due to the lack of built-in bulk editing or batch editing in Zotero, I've developed a script that enhances and expands upon Schoeneh's Zotero Search and Replace script.

You can find the script and detailed instructions (with pictures) here:
https://github.com/thalient-ai/zotero-scripts/tree/main/zotero-bulk-edit

This script enables users to bulk edit record metadata in Zotero with a user-friendly prompt system for searching and replacing field values. It supports regular expressions, suggests field names, handles both fields and creator entries (author names), and offers the option to edit selected items or search across collections or saved searches.

The script is designed to be easy to use.

I use the script in Zotero 7, but I don't see why it wouldn't work for older versions.
  • edited June 16, 2024
    Very nice. Thanks!
    (I'll include it in an upcoming blog on my site)
  • Thanks, damnation. I'm continuing to improve the script.

    It now supports Notes but only if they are selected. I'm looking into being able to edit Notes across a collection or search, but it may not be possible.
  • I think you need this zotero plugin, [windingwind/zotero-actions-tags: Customize your Zotero workflow.](https://github.com/windingwind/zotero-actions-tags)

    and welcome to [windingwind/zotero-actions-tags · Discussions · GitHub](https://github.com/windingwind/zotero-actions-tags/discussions) to share more interesting scripts.
  • edited July 9, 2024
    .
  • Thanks so much for this script! It's one other thing that has stopped me moving over to Zotero 7, since this function in Zutilo is essential for me.
  • Thanks @thalient, your script made updating our collection of over 12,000 items to have consistent Language fields absolutely painless.

    I tweaked it to bypass escapeRegEx() because I wanted to be able to change "en" to "English" without changing "French" to "FrEnglishch".

    The script wouldn't find matches for ^en$ because escapeRegEx() was changing it to "\\^en\\$" -- turns into a RegExp of /\^en\$/ (literally searching for ^ and $ characters) when I actually needed /^en$/ (where those characters mean start of line and end of line).

    I can see the current script working very well for people who don't know that ^$[]{} etc have special meanings, but maybe the script needs one more setup question for regex users: do you want to use regular expressions? If so, then bypass escapeRegEx() and trust that the user knows what they're doing :)
Sign In or Register to comment.