Renaming pdfs zotfile-style but with Zotero storage

Is it possible to use zotfile for renaming pdfs without moving and linking them outside of the database? I have been using Zotfile to rename pdfs to (author et al) - (year) - (title). Can Zotero do this?
  • edited 15 days ago
    ZotFile might be able to rename stored files as well, but if you just want to change the order of the components like that, Zotero can do it. See attachmentRenameFormatString on Hidden Preferences. (We'll expand the built-in renaming options at some point.)

    Zotero already does this by default.
  • Thank you - found it! And it was already set to the right preference. But another question, extension.zotero.autoRenameFiles is set to true, but Zotero doesn't rename the pdfs when I add them via the safari extension.
  • Files are renamed based on metadata and when you add a PDF directly, there isn't any metadata to rename it from (yet).
  • edited 15 days ago
    (Sorry, I was misremembering our default order. Yes, if you want author - year - title, Zotero already does that by default, as long as there's metadata.)
  • Yes, so it does create a parent with all the metadata, and then the pdf. But the pdf is not renamed based on the parent file before I press "rename file from parent metadata"
  • edited 15 days ago
    Yes, it is. It renames the PDF both if you save from the article page with an attached PDF (the recommended approach) and if it retrieves metadata for a PDF you add directly.

    If you think you're seeing something different, let us know the exact steps you're taking and what you're seeing.
  • I am seeing something different, and I just took some screenshots of it, but I can't post them on this forum. But the process is:
    1. I press the extension in safari and choose the article I need
    2. The popup comes in the right corner with the metadata for the parent item and after a short while the pdf now called "Full text PDF"
    3. I go the my library and the pdf is still called "Full text PDF" until i press "rename file from parent metadata"
  • (sorry, what I wrote above was wrong -- that applies to renaming with ZotFile, not with Zotero).

    "Full text PDF" is the *title* of the attachment in Zotero. Titles are mostly uniform to make finding, e.g. all such attachments easy.
    The actual filename -- which you can see in the right-hand pane or by using right-click --> Show file -- is different.
  • Titles are mostly uniform to make finding, e.g. all such attachments easy.
    And because there's no point naming the attachment title based on the metadata by default because there's already a parent item with all the metadata.
  • But then again, what is "extensions.zotero.autoRenameFiles.fileTypes" and "extensions.zotero.autoRenameFiles" for in hidden preferences?
  • edited 15 days ago
    autoRenameFiles is just the visible setting in the prefs, which applies when you add a PDF directly (from the connector or filesystem) and metadata retrieval is performed (based on metadata-retrieval pref). It's on by default. And based on fileTypes, it applies only to PDFs by default. You don't need to worry about these prefs. This just works.

    When you save from an article page and a PDF is downloaded automatically, renaming is always performed, since there's often no filename to begin with.
  • Yeah I see that now, so there is a function in the settings called "Automatically rename attachment files using parent metadata", but that is just what I wrote about that it is not doing. This is PDFs I am talking about.
  • Again, it is renaming the file. Just do a Show File if you don't believe us. It's not renaming the title of the attachment item in your Zotero database.
  • Aha, I see now - pardon and thank you for your patience. :)

    Would it be possible to add this as a feature request then? To automatically rename the pdf in the library as well?
  • edited 15 days ago
    Why? Again, there's no point — the parent item already has the metadata. The attachment title often provides additional information on what the PDF is (e.g., "Submitted Version" for an open-access PDF). It's unlikely we'll make this configurable, since it would involve throwing out metadata.
  • Yeah, you are right! I was just accustomed to Zotfile, need to adapt to the new appearance, but I realize it doesn't makes sense. Thank you
Sign In or Register to comment.