Zotero stopped automatically renaming files
I recently noticed that Zotero sometimes does not autonamically rename PDF files (attachment names).
In Settings I have checked both 'Automatically rename files' and 'Rename linked files'. Sometimes it does work and I can see attached PDF file change name real time, but sometimes not, and then I have to run "Rename Files ...". Last time I had around 20 PDF files needing a name update.
In Settings I have checked both 'Automatically rename files' and 'Rename linked files'. Sometimes it does work and I can see attached PDF file change name real time, but sometimes not, and then I have to run "Rename Files ...". Last time I had around 20 PDF files needing a name update.
Upgrade Storage
To reset them, you have two options:
It says "Zotero automatically renames files on disk based on parent item metadata such as the title and authors", and I set mine to be e.g. "Smith [2001] - The best study". However, Zotero for some reason, sometimes, just stops renaming them automatically.
I would link a PDF file to Zotero, then use Tools>Manage Attatchments>Convert Linked Files to Stored plus Normalize Attachment Titles. And for the most time it works as intended. But sometimes it would convert the file and write 'PDF' under parent item in Zotero, however, when I go "Left Click>Show File", the filename would still be "abcdf1221ff".
It would remain like that until I manually run Configure File Renaming>Rename Files. And yes, the options "Automatically rename files" as well as "Rename linked files" are ticked.
I think @tnajdek could be right, but I didn't have the time to test it with new and previously renamed files. I'm unsure if he meant that filename was renamed before putting it in Zotero or after, because I do not do that.
For instance, when a translator's name was incorrectly imported as "author" it renamed the PDF with both creators (I have this pattern: `{{ firstCreator suffix=" - " }}{{ year suffix=" - " }}{{ title replaceFrom="([:?].*)" }}`). But when I changed the field from "author" to "translator" the PDF name wasn't updated.
And unfortunately, since the previous "Rename PDF" context menu item is now gone since it's obsolete, I can't even manually trigger a rename (other than from the application preferences).
https://s3.amazonaws.com/zotero.org/images/forums/u2119014/34wci409zv5jfdm3iy3w.png
extensions.zotero.autoRenameFiles.onMetadataChange
It's True by default, but if renaming is not working as it should be, it's worth checking if yours is False.
I prefer to set mine to False (I know it says above that Zotero respects any manual name changes and then no longer attempts to update the name when the metadata changes, but that wasn't by experience at the time I changed the setting).
@tim820 yes, `extensions.zotero.autoRenameFiles.onMetadataChange` is set to `true` – so that's not the issue.
@tnajdek In my case the item type has not been changed, only the "field type" (from "author" to "translator") – but perhaps it's the same bug?
I restarted Zotero and it worked. I changed the translator back to author, and it did rename the PDF with both names.
FWIW, the item type was never changed for this particular item, however, I did recently change the type of another item – so perhaps that might have still produced that state you mention.
But it works fine now, thanks for helping out!