Automatic Rename file with parent metadata

Hi,

Is there any way to use the option "automatic rename file with parent metadata" at the moment we add it to zotero (When zotero automatically downloads the pdf from the webpage)?

Either that, or run a script or other way to do it for every new file?

Thank you.
  • Zotero should already do that -- could you describe the exact sequence in which it doesn't?
  • I am seeing the same issue:
    When I use the Zotero plugin in Chrome to capture a journal article, it pulls in the PDF if available, but it is given a default name "Full Text PDF" rather than renamed with the metadata. However, when I download the PDF manually and then drag it onto the Zotero database entry, it is renamed automatically as expected.
  • I should say I'm running Zotero 5.0.47 on a Macbook Pro OS 10.12.6 and Chrome browser 66.0.3359.139.
  • "Full Text PDF" is not the filename. It's a label given to the file based on what it is (in this case a full text PDF). You can see the filename in the right-hand panel when you select the attachment in the middle panel.
  • OK -- but when I drag a PDF onto an entry, Zotero gives it matching file name and label. In this instance I see that you are correct, it has renamed the file, but not the label. Why the different behavior -- is there a reason I should view this as a feature rather thn a bug?
  • Because there's no way to assign it a label -- we don't know what the PDF is.

    Having the label for automatically downloaded PDFs can be convenient (e.g. it allows easier searching for those files) and I see very little downside to it.

    So it's definitely not a bug in the technical sense of the word. Whether it's still optimal UX given recent changes to Zotero's rename behavior I'm not sure. Personally I don't really think it matters much either way -- why do you care, for example?
  • Maybe now that I realize is is only the label... it won't bother me so much. But, it seems strange that it labels them differently depending on how I add the full text. I don't like feeling that I need to look and see that the label and the filename are different. There are a lot of files that were added before this recent change to Zotero that don't have good filenames and I try to fix them when I encounter them. Now, I need to take an extra step and check the filename to be sure.

  • Everything that has a "Full text PDF" or similar label will have had its filename renamed since the beginning of Zotero, so you don't actually need to check the filename for those items.
  • I'm encountering the same issue.
    E.g. for this article: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9299376/
    I click on the Zotero connector icon (I'm in Firefox), it adds it in my library, and the PDF has the following name:
    Cai et al_2022_ATM-TCR.pdf
    Then, if I right click on this pdf, and click on "Rename File from Parent Metadata", then the new name is:
    Cai et al. - 2022 - ATM-TCR TCR-Epitope Binding Affinity Prediction U.pdf

    How can I do so that I don't have to manually ask to rename it?
    I checked my preferences, and I have the "Automatically rename attachment files using parent metadata" box checked.

    If instead on the ncbi webpage, I click on the link to get the PDF, I end up on this page https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9299376/pdf/fimmu-13-893247.pdf.
    From there, the Zotero connector icon has changed to a PDF, and when I click it, the reference is added into Zotero with the right name for the pdf:
    "Cai et al. - 2022 - ATM-TCR TCR-Epitope Binding Affinity Prediction U.pdf".

    Is this difference of behaviors normal?

    Finally, it seems like it's not possible to use the Zotero connector when the PDF has actually been downloaded (i.e. when it has a URL in "file:///home/..." instead of the website URL). This website is an example of it: https://www.frontiersin.org/articles/10.3389/fimmu.2020.01803/full
    In that case, I have to go to my Downloads, and then drag it to Zotero. Is there a plan for supporting such a use case in the Zotero connector?

    Thank you very much for all your work with Zotero, it's an amazing software!
  • edited June 9, 2023
    Cai et al_2022_ATM-TCR.pdf
    That's not a name from Zotero. You might be using some plugin (e.g., ZotFile) that renames things differently. If I save from the PubMed Central webpage, I get "Cai et al. - 2022 - ATM-TCR TCR-Epitope Binding Affinity Prediction U.pdf" as the filename.

    Zotero always renames files from the web in that format, since files online often don't have filenames and when they do they're often meaningless. The "Automatically rename attachment files using parent metadata" setting is just for local files that you add, since those are more more likely to have filenames you want to keep.
    Finally, it seems like it's not possible to use the Zotero connector when the PDF has actually been downloaded (i.e. when it has a URL in "file:///home/..." instead of the website URL).
    The extension can't run on file:// URLs. But you should always try to save from the article page anyway, which works fine on Frontiers.
  • When using Zotero connector, I am able to save the information for the articles I am looking for, however the associated PDF is always named as Full PDF. I have to keep manually renaming the PDFs from within Zotero using the normal "Rename using parent metadata" option. However, I believe this should be automatic when using Connecter in any case. If so, please can you assist in troubleshooting? My setup is listed below. If not, where can we suggest that it be set as default as if all the research one does is renamed the same generic filename, this seems counterintuitive.

    Setup:
    Zotero (version 6.0.26)
    Zotero Connector (version 5.0.112)
    Chrome (116.0.5845.140 (Official Build) (x86_64))
    Macbook Pro 2019 16" (13.4.1 (c) (22F770820d))
  • edited September 3, 2023
    Oliver Hartley: As explained above, "Full Text PDF" isn't the filename — it's the attachment title that appears in the items list. The file on disk is named based on the parent metadata, as you can see if you look at the Filename field for the attachment item or do right-click → Show File. As long as Zotero has existed, files saved from the web have been automatically renamed based on the parent metadata.

    You don't need to — and have never needed to — run Rename File from Parent Metadata to rename a file saved via the Zotero Connector, and in Zotero 7 that will no longer change the attachment title, which was incorrect behavior. Showing the filename in the items list is pointless, since the parent metadata is already shown in the parent row directly above the attachment.
  • @dstillman Thank you for making that clear, I have check and see that it works.

    Is there a way to change the Title to suit the same?
  • I'm not sure what you mean by that.
  • edited September 3, 2023
    I meant a way to change the title of the pdf displayed in Zotero so that it automatically reflects the name of the file, rather than the default Full PDF?
  • edited September 3, 2023
    Not currently, though we may make that possible in Zotero 7.

    But can you explain why you want that? Again, the metadata used to rename the file is most likely already in the parent row, so showing the filename would just be adding redundant info to the items list that makes it harder to read. "Full Text PDF" (or other automatic names, such as "Submitted Version" for some open-access files) tells you what the file actually is. If you just know that Zotero always renames files automatically based on the pattern you've set, what's the point of seeing it in the items list?
  • edited October 19, 2023
    You don't need to — and have never needed to — run Rename File from Parent Metadata to rename a file saved via the Zotero Connector, and in Zotero 7 that will no longer change the attachment title, which was incorrect behavior. Showing the filename in the items list is pointless, since the parent metadata is already shown in the parent row directly above the attachment.
    I have used that "Rename File..." since I started using Zotero (2016 --'), because I never realized there was a difference between the label and the filename (actually I probably unconsciously did, since when changing the label/title, the prompt asks if I want to rename the filename too. But I guess it never occurred to me why it would be useful to have a different label and filename. And maybe a lot of users are in the same situation.

    It's only now that you've said
    "Full Text PDF" (or other automatic names, such as "Submitted Version" for some open-access files) tells you what the file actually is
    that I've realized why this is like that... --'

    For some reason, I was scared that if I leave "Full Text PDF" for the title, when I have a lot of PDFs opened in Zotero as tabs, all the tabs would say "Full Text PDF", and then I wouldn't know which one is which. But of course not, I just checked, and the tab title is the filename, not the label, which makes sense :)

    Anyway, thank you for the clarification! I guess maybe that would deserve a bit of clarification for new users? It's also that the filename is kind of hidden, compared to the label. But it seems you have plans to address this in Zotero 7?
Sign In or Register to comment.