attachment file name is changed automatically

Hello,
When adding attachments (pdf files) to my latest papers records, I saw that the attachment names are automatically modified.
This was not the case until last Friday.

A right click on the attachment shows an option to rename file after parent's metadata. I guess that this option has been selected by default, but this is not what I want, and I did not selected this option.

Could you tell me how to get back to the original behaviour?

Regards
«1
  • Do you have the Zotfile plugin installed?
  • This did indeed change in the last version of Zotero: https://www.zotero.org/support/5.0_changelog#changes_in_5034_january_11_2018
    It brings the naming of attachments dragged to Zotero in line with those automatically downloaded with items and I don't think there's an option/preferences to turn that off.
    Can I ask why you'd not want that, given these files are attached and not linked?
  • For ages I have my own naming style, and if I transfer a file to somebody else, I do want this naming style to be respected.

    Furthermore, the name chosen by zotero is too long, and contains spaces which are poorly handled when changing OS.
    For instance:
    "Kipling et al. - 2016 - What controls the vertical distribution of aerosol.pdf"

    Also because the name chosen by zotero includes language preference, which is not good:
    "Bourgeois et Bey - 2011 - Pollution transport efficiency toward the Arctic .pdf"
    the second word ("et", and in French) will sound weird if I transfer this file to someone else who doesn't speak French).


    And above all, this is really annoying to feel that a software is taking action without notice nor a way to keep the original behaviour.
  • But you realize that Zotero is already doing this (and has forever) for all files that it imports via the web translators? Are you not using those? If you need more finetuned filenaming, you can use ZotFile as bwiernik alludes to, but I'm not sure Zotero devs will (or should) be willing to put in a preference to turn this behavior (which has been frequently requested) off.
  • Yes, this is just matching the behavior of the web-based saving.

    That said, we've long wanted to add more customizable file renaming (similar to ZotFile) to the built-in renaming feature, and I don't think there's any reason one option couldn't be the original filename.
  • > But you realize that Zotero is already doing this (and has forever) for all files that it imports via the web translators? Are you not using those?
    No.

    > If you need more finetuned filenaming, you can use ZotFile as bwiernik alludes to
    Sorry I'm not sure to understand what you mean.

    > I'm not sure Zotero devs will (or should) be willing to put in a preference to turn this behavior (which has been frequently requested) off
    I'm not sure that changing the behaviour of zotero in an authoritarian way, without notice, without enquiry whether if will be good for all users or not, is a good way to proceed.
  • do you believe that formulating a criticism is not right with the etiquette?
  • Your posts sound exceptionally rude and snarky. ("authoritarian way"???) If this isn't intentional and just a language issue, I'd recommend posting in French, which most of us here read.
  • ok, sorry if this word sounded wrong.
    I will thus switch to French as you suggest:

    Ma remarque (qui ne se voulait donc pas désobligeante) pointait le fait que depuis que zotero existe, les pièces jointes conservent le même nom que celui donné par l'utilisateur, lorsqu'on procède par glisser-déposer. Du jour au lendemain, ce fonctionnement change, d'une manière apparemment irréversible.
    Parmi les justifications données, l'argument comme quoi c'est déjà le fonctionnement qui existait sur un type d'action, et qui a simplement été étendu à tous les types d'actions similaires : fort bien, mais qu'en est-il de la prise en compte de la variété des usages des différents utilisateurs ? Je prends maintenant des précautions, c'est une remarque, une critique, mais ça se veut constructif : pourquoi ne pas développer une fonctionnalité (ou étendre une fonctionnalité existante) en choisissant de la rendre paramétrable, plutôt que d'imposer un type de fonctionnement ?
    Au passage, je me permets de citer un passage de l'étiquette à laquelle vous me renvoyiez plus haut :
    " Keep an open mind.

    Different people use Zotero in different ways."

    :-)
  • Thanks. See dstillman's comment above:
    we've long wanted to add more customizable file renaming (similar to ZotFile) to the built-in renaming feature, and I don't think there's any reason one option couldn't be the original filename.
    which would give you what you want. Might not be immediate, but will likely happen.
  • edited January 15, 2018
    It occurs to me, though, that a renaming rule to use the original filename doesn't even really make sense, because that can't apply to web saving, which might have very long, gibberish filenames that need to be renamed.

    I don't really see this being pref'ed, given that 1) most files people are adding manually were likely still downloaded from the web with meaningless names, 2) if you really do want the original filename, you still have the original file and can paste it in to rename the attachment file, and 3) the whole point of storing rather than linking files in Zotero is to let Zotero manage them for you, so if anything it should be automatically keeping filenames in line with parent metadata, including after automatically retrieving metadata for added files. So I would say that, if you want to use a particular filename form, you can either 1) use linked files (possibly with ZotFile) or 2) use customizable renaming rules for stored files once those exist in Zotero. If someone wants to work on implementing those, which should be fairly straightforward, I'm happy to provide guidance.
  • I agree that web names are sometimes not good, and another issue is they are always different from one editor to another.
    This is why I used to manually edit all pdf files that I downloaded, to get always the same name (and keep a reasonably short name, and avoid special characters to improve portability).

    Specific answers to dstillman:
    1) cf my method above, since all editors have different labels for their pdf, i always rename them to be consistent
    2) I agree, this "just" means one more operation for any pdf added to zotero
    3) I also agree that most of the time, the name of the file stored in zotero's directory has no importance. But as soon as you share part of them with other people, this becomes important (all the more so regarding the compatibility issues, since zotero is adding spaces, and final names are sometimes very long, cf. the examples that I gave in my first message)

    I will have a look to the ZotFile plugin that you advise to use (sorry "bwiernik", you told about this in the first answer here, but I had not understood properly: I thought you were telling this was the cause of the modified behaviour).
  • If you don't like ZotFile, you can also just turn around your workflow as dstillman suggests:
    First save the file in Zotero with whatever filename, and then rename the file in the right-clicking on the bold file-label in the right-hand panel and checking "Rename associated file".
    I'd still think this would save you time compared to your current method (and produce the same result, i.e. custom renamed files).
  • @lutin38: I don't know what "compatibility issues" you're referring to. Zotero generates filenames that should be valid on all OSes. No modern OS has trouble with spaces in filenames. For length, the filename will generally be 80–100 characters (since the title is truncated at 50 characters). Length might be an issue if you copy a file into an extremely deep folder hierarchy on Windows (if paths > 260 characters haven't been enabled, which they can be starting in Windows 10), but that would be very rare.

    Again, Zotero has been renaming files this way for a decade (and has only become more restrictive over the years), so this is not any sort of general problem.
  • Yes, I would recommend that you use the Zotfile plugin to automatically rename your files according to your desired pattern. It is quite flexible in terms of what it can do.
  • One user's perspective (and I've spoken with another who feels the same): I would appreciate if Zotero allowed me to retain the original file name. Based on how I use Zotero, it is better for me to attach files rather than link them. And based on how I download PDFs, add them to Zotero, and share them, it is better for me to rename them after I download them and for Zotero to retain the original name.
  • Can you explain that workflow -- I do find it a bit hard to understand why you would have all of the below be true:
    1) Attach files in Zotero
    2) Not be satisfied with Zotero's own renaming
    3) Never rely on Zotero's automated attachment of PDFs
    4) Find Renaming files in Zotero impractical
  • Right — part of the problem with a preference here is that it doesn't seem to make a lot of sense to differentiate between the different ways of adding files to Zotero, since which one you use will often be arbitrary based on whether the translator was able to automatically add the file. If it wasn't, you'd download the file and attach it to the item manually, but if it had gone through via the translator the file would've been automatically renamed (for as long as Zotero has existed).

    In an upcoming version, adding a standalone file (via any of the many ways that can be done) will automatically run Retrieve Metadata for PDF, and while you'll be able to disable that feature, if enabled I would expect the file to be renamed automatically, the same as if you saved the item from the web.

    Put another way: what would the actual pref here be? Would it apply to translator-based saves (resulting in, potentially, long, gibberish filenames)? Would it apply to Retrieve Metadata for PDF (run automatically or manually)? Or would it apply only to local files added to existing items (the new behavior here), and if so, what would be the justification for that?

    Additionally, if you want this just because you prefer your own format for filenames, would adding ZotFile-style customization options for the renaming not solve the problem, in an automated way that applied to all file renaming in Zotero?
  • I agree with Matt Klem. I was frustrated when I attached a PDF to Zotero today and saw that Zotero automatically renamed the PDF. (I don't mean to sound unsatisfied with Zotero overall. I *love* Zotero!) I have attached over 14,000 PDFs to items in Zotero, and I have a uniform way to name them. I often share my PDFs with my students and others, and I prefer the files to have the same file name when I share them (e.g., when I upload them to Populi for my courses I teach).
  • See my questions above.
  • Particularly, why would using Zotfile to automatically name the files according to your system not work for you?
  • In response to dstillman's question above (and I'm Andy Naselli's TA, so I answer for him as well),

    2–3. We add not only PDF's of journal articles but PDFs of books that we receive directly from the publisher and PDFs of books that we have scanned. We collect these various PDFs in a folder regularly, and we add them all to Zotero at regular intervals. We find adding items to Zotero in batches like this to be most efficient. And it helps us to add them all the same way even if some are journal articles, some are books, and some are other files (such as .docx or .pptx files). It easiest for us to name the files according to our system while still in the folder before adding them to Zotero because that helps us add them in batches efficiently. Because we share PDFs that we store in Zotero regularly, and we already have a naming system in place, it helps us when Zotero retains the file names. For example, on existing syllabi, we mention files by name that we make available to students.

    4. My favorite thing about Zotero is how much time it saves me (among all the other ways it helps me!). Any additional procedure that I have to repeat every time I add a PDF makes adding files to Zotero less efficient for me.

    I confess that I do not fully understand some of the features or considerations you have mentioned in this thread because I don't know Zotero well enough. And I have not tried the ZotFile plug-in (though again we prefer for existing names to remain, not for Zotero to rename them—even in a way more consistent with our system). But our system of using Zotero has facilitated our work well for some time. So we would appreciate the ability to continue using it in that way.
  • I'm with mklem and anaselli on this. There should be a way to disable Zotero's renaming of PDF attachments.

    I tried Zotfile and there doesn't appear to be an option to disable renaming.

    A workaround would be to use "Attach Stored Copy of File" for adding attachment. This does not appear to be affected by Zotero's PDF renaming.
  • So just to repeat the central question here for the people who would use this pref:

    Zotero has, for as long as it has existed, automatically renamed PDFs saved from the web. Therefore, an option to disable renaming would either have to disable that longstanding behavior as well or revert to a situation where some files were renamed and some weren't (even if that was only because Zotero wasn't able to automatically save a PDF from the web and you had to download and add it yourself). The latter is what we were trying to fix here, so we would likely have the pref disable renaming from the web as well.

    If you would use this pref, is that a change you would find acceptable?
    And I have not tried the ZotFile plug-in (though again we prefer for existing names to remain, not for Zotero to rename them—even in a way more consistent with our system).
    @mklem: Can you explain why that is? The point is that you would customize the renaming settings so that files you dragged in wouldn't need to change if you had already renamed them. Or are you saying you're renaming in a way that can't be automated by basic rules? (Not trying to dismiss your argument — just trying to understand the reasoning so we can address it properly.)
    A workaround would be to use "Attach Stored Copy of File" for adding attachment. This does not appear to be affected by Zotero's PDF renaming.
    @orest: Yes, the "Attach Stored Copy of File" behavior hasn't yet changed. We'll certainly make it consistent with dragging, one way or another, but we'll hold off on that for the moment so it can be used as a temporary workaround.
  • edited February 6, 2018
    About this (renaming) change and it being done also previously:

    Importing PDF via the web translators has never worked for me (and I presume this is the case for many other users, too, since this feature, or change, seems to be "a surprise" to many). This is probably because I need to use a proxy / login provided by my university library (and Zotero does not know about this proxy, and hence can not access the PDFs which are behind a paywall 95% of the time). Actually I'm not sure about that, since I've needed to import all (?) PDFs manually (even though I'm certainly using some sources which are free / open access).

    I know for a fact that many users share files trough email and other means, and a lot of people rename their PDFs (and other documents) manually for these uses - no matter how backwards that may seem.

    I can think of several use cases where a user wants to use the excellent metadata (and other) features of Zotero, but still store PDFs in the cloud, *but* retain the original naming scheme. For these users the current chance can feel suprising and cause frustration.

    But to answer dstillmans last question: I think the answer is a "Yes". There should be an option to not rename files that have been imported by the user manually (since it is *not* safe to assume in this case that the file name does *not* contain information that is important for the user; contrary to files that have been sourced automatically by web translators). Renaming files saved by Zotero automatically can (and should) be handled differently (i.e. in the same way it has been until now).

    Also: I'm a long-time user of ZotFile, and rename (and move) all my files (linked in Zotero) with it to my liking. I can recommend it!
  • edited February 6, 2018
    But to answer dstillmans last question: I think the answer is a "Yes". There should be an option to not rename files that have been imported by the user manually (since it is *not* safe to assume in this case that the file name does *not* contain information that is important for the user; contrary to files that have been sourced automatically by web translators). Renaming files saved by Zotero automatically can (and should) be handled differently (i.e. in the same way it has been until now).
    Just to be clear, that's "no", not "yes" — as in, you don't agree with my proposed change, which was to have the pref apply to both operations. While I think your argument is a fair one, I did explain our reasons for not wanting separate behavior for saving via the web vs. adding from a file.
    Importing PDF via the web translators has never worked for me
    That's certainly not normal, so we're happy to debug that in a separate thread. As long as you have access — through a proxy or otherwise — Zotero should be able to download the PDF automatically, and that's certainly the recommended way of working in Zotero.
    I'm a long-time user of ZotFile, and rename (and move) all my files (linked in Zotero) with it to my liking.
    I'm still a bit confused by this. If you're using ZotFile's automatic renaming, why does this change affect you at all?
  • So here's the argument for having the pref apply only to manual adding (i.e., the opposite of what I suggested above):

    1) As @ville.aakko says, there is a legitimate difference between files downloaded automatically and those that already have filenames on your computer, so if you disable the pref because you prefer to rename files before importing, there's no real reason to think you also want to disable web renaming (and no one in recent memory has complained about that behavior).

    2) While it's true that saving a PDF from the web might fail and you might need to download and add the file manually — in which case you would presumably want the same renaming behavior — this pref will default to on, so we'll still have fixed that inconsistency for the default case.

    2b) If you've turned this off, there's a good chance you're going to rename the failed file before adding it anyway (and perhaps you're already manually renaming web-saved files in Zotero via the right-hand pane).

    3) While turning this off would still leave files from the web being renamed automatically, and that's sort of weird if the rest aren't, it's not any less weird than having random/gibberish names from the web, which would also be inconsistent. And you always have the option of using "Rename File from Parent Metadata" manually on added files in the cases where you're happy with the auto-renaming.
  • Yes, I meant "no" previously (I got a bit confused). I think I already explained why I think this is so, but just in some other words: it is a whole different thing for a program doing something for files and/or other data a program imports/sources automatically, than doing something for files/data input manually by the user. I believe this is a corner case / in the grey area, but the question really is, does Zotero breaks this user interface / program behaviour paradigm: do not do things without users consent. I can understand some (most?) users wanting renaming per default in this context; but I strongly feel there really should be some kind of option for this.

    But to answer your another question: this doesn't affect me, I was just reflecting on other users on this thread, and can understand their frustration.
    Even if there was an option to not do automatic renaming, I'd still leave it on and welcome the feature *personally*.

    However, I know colleaques who'd have hard time picking up a reference manager altogether (and certainly want their files named the way they have for years), and this kind of behaviour - which can be seen as reasonable and sound by many - from a new program might scare them away altogether from using it. In any case there's still at least one strong use case: sharing files outside Zotero, which includes getting them from colleaques (who might not use Zotero or a ref manager at all) and other sources, importing, exporting and sharing the PDFs again. In this case usually there is already some kind of (manual) naming scheme in place and automatic renaming essentially makes using Zotero a bit of a hassle. I believe this is something some users in this thread are doing.

    IMO it makes most sense to make it at least possible to have the previous behaviour (pre 5.0.34), since that is the only way users expectations how the program (used to) work(s) can be met (if I've understod correctly - I've never had automatically imported PDFs by web translators so my understanding of the feature relies on this thread).

    However maybe it makes sense to wait a bit for more user input for other opinions; but in my view the question can be established us such; should the (possible, if the devteam makes it so) option:

    1) Be two state, with one check, box:

    [X] Enable automatic renaming for manually attached files (default: off?)

    (web-translator imported files will work as they always have up to this point)

    2) Be a tri-state option, for example, two check-boxes:

    [X] Enable automatic renaming (default: on?)
    [X] Enable automatic renaming for manually attached files (default: off?)

    (latter check-box could greyed out if former is disabled/unchecked, since it probably makes no sense to disable 1. and enable 2.; but if desired this could easily be made into two separate options; or quad-state if you like that expression)

    The exact wording / function might be reversed by writing "Disable" instead if that seems more appropriate / fluent for the UI; or a radio button used/whatever.

    In any case, this is just my opinion / suggestion!

    ([OT] about PDF importing from pages: I believe it definitely has something to do with the uni proxies I need to get behind paywalls; I tried a few pages that are open access without the proxy - and for those PDF importing works without problems, but to do that I need to start another session in, say, pubmed - without the proxy - which can be a hassle if I'm going trough some search results. To stay on topic I'll maybe start a new thread about this later; [/OT]

    But just want to point out, I had missed altogether that Zortero should be able to retrieve PDFs automatically until now, since it never worked for me. The feature is described in one sentence and there's no mention about proxies in this page: https://www.zotero.org/support/getting_stuff_into_your_library ; I think it is easy to miss.

    Perhaps other have, too, since paywalls and institutional proxy usage might be quite common? This maybe the reason this new behaviour is suprising to some users.)
  • Hi,
    I don't want to automatic rename. It should be optional. I have my own rename style and all my library were designed with this. I cannot change it.
    Thank you
Sign In or Register to comment.