Bug: old filenames of attachment links are displayed and won't be updated

I renamed many PDFs on my disk which broke tens of links to files (not embedded attachments) in Zotero. I selected the broken links one-by-one in Zotero, clicked on 'Locate...', and pointed to the correct files. Double-clicking on the linked items works fine now and Zotero restored the correct attachment icons, but the filenames displayed on the Zotero list (middle pane) and on the right pane are the old ones. 'Check database integrity' and restarting doesn't update the filenames. I suppose rebuilding the index might resolve this, but it seems there is a bug.
  • This isn't a bug. Those aren't filenames. They're attachment titles, and they only start the same as filenames in some contexts. If you rename files outside of Zotero — which you shouldn't really do — and then need to relink them in Zotero, that doesn't have any effect on the attachment titles.

    If you want to rename files that are in Zotero, you're much better off 1) letting Zotero rename them based on the parent metadata, 2) using the ZotFile plugin to choose a custom filename format based on the parent metadata, or 3) if you really want to spend time renaming everything by hand (which is generally not a great use of time), renaming them within Zotero by clicking on the attachment title in the right-hand pane and checking "Rename associated file", which will change both the attachment title and the filename.

    I suppose it might make sense for Zotero to update the attachment title when relinking a missing file if the attachment title is equal to the previous filename, but when you rename things outside of Zotero you're breaking links, so it's really just not the right way to do things.
  • Thanks for explaining this. It's not a bug but then not being able to change the attachment title is an odd omission. I normally allow Zotero or Zotfile to do the renaming, but on this occasion I had good reasons to do it manually. So, once set, the attachment title can be completely wrong and all you can do is remove the whole item and start all over again. The sensible thing of course would be to (optionally) change the attachment title in line with the filename. Linked files, as opposed to embedded attachments, have a life outside Zotero and their filenames may be significant in different contexts. The files may even change dynamically -- that's one advantage of linking after all.
  • You can change them by clicking on the bold text in the right-hand pane when the attachment is selected; it just doesn't happen automatically on changing the file.
Sign In or Register to comment.