File renaming customization

Hello,
after some crawling through several documents, I found in the changelogs that the file renaming can be customized (with truncation) via Firefix' about:config -> extensions.zotero.attachmentRenameFormatString. I was hoping for an easier way to find that variable, but now I found it anyway :)

Now my question is: What are the possible variables in this expression, and is there an option to convert spaces to underscores? Even better would be a complete list of available options :)

AFAICT, %t stands for the title, %c are the authors and %y is the year, each variable should be enclosed into curly braces and {n} would truncate the resulting string to n characters.

Thanks for your answers,
Daniel
  • It looks like those are the only available variables.
    Zotero automatically renames attached files saved from translators. This string controls how those names are formatted. %c is creator, %y is year, %t is the title, the curly braces around each part mean “only include this part if the field specified inside is non-empty”and {50} means “truncate at 50 characters.” You can rearrange these to suit your needs.
    hidden_prefs [Zotero Documentation]
  • yes, that's right. Dan has mentioned that he'd consider adding additional variables if there was strong demand for anything in particular, though. Obviously most convincing is a potentially common usage scenario.
  • edited April 12, 2010
    Thank you for the fast replies.

    One additional variable I would find useful would be something like %j for the journal or publisher. Titles can be very similar (especially for the same authors in the same year), but author/journal/year is pretty unique in many cases and also often used colloquially to reference a specific paper.
  • Is there a way use just the last name of the first author? I'd prefer not to have several authors or et. al. with periods.
  • edited November 4, 2022
    Not with Zotero's own renaming, but ZotFile (which you can use *just* to rename files without any of its other features) has that option, see the last of the examples in the documentation.
Sign In or Register to comment.