Revert automatic renaming?

Hi all. Out of frustration with Mendeley, I recently (= today) started using Zotero. I thought the software to be a worthy alternative to what Mendeley once was, until I realised all of my PDF file names (thousands of them) have been renamed automatically without my consent.

I don't know who in their right minds would even consider implementing such an asinine feature, let alone enabling it by default, but obviously the damage has already been done. Does Zotero by any chance store the original file names, so that my carefully organised file system could be restored?
  • edited March 26, 2019
    I'm not quite sure what you mean here. When you import from Mendeley, you can choose to either store copies of files or link to your original files. If you choose to store files, Zotero copies those files into the Zotero data directory, and the copies get renamed by default, though you can turn that off in the preferences. If you choose to link files, Zotero simply links to the original files. In neither case should the original files be renamed.

    Is it possible you're looking at the filenames of the stored files rather than the original folder of PDFs that you used with Mendeley?
  • Apologies for the confusion. I did not import anything directly from Mendeley. I imported my library with the "Link to file" functionality. No files were copied into the storage directory, yet all of the original files have been renamed automatically (even though you say that in such case none of the original files should have been renamed).

    In my old naming system, I would sometimes add keywords to highlight certain aspects (like "[review]" or "[supplement]"), which would help me find key publications. In the Zotero naming scheme, all of this information is lost. Is there any way of reverting the name changes?
  • edited March 27, 2019
    I did not import anything directly from Mendeley. I imported my library with the "Link to file" functionality.
    Sorry, still not sure what you mean by that. Are you saying you used Zotero's Mendeley importer and selected "Link to files in original location"? Or did you manually link those files using the "Link to File" option in the New Item menu (green + icon in the Zotero toolbar)? You certainly wouldn't want to do the latter, since that wouldn't transfer any of the actual metadata, folders, notes, etc., in your Mendeley library.

    If you did do the latter, though, what version of Zotero was this with? In Zotero 5.0.60, and for a year prior, linking to a file would rename it based on the parent metadata. In 5.0.61, which came out on March 9th, we added a separate "Rename linked files" setting in the General pane of the preferences, defaulting to off. So if you just downloaded Zotero, which is up to 5.0.64, that should've been off, and linking to files shouldn't have changed their filenames. But if you had an outdated version, you might have gotten the previous renaming behavior.

    In any case, I'm afraid there's no way to revert the renaming done by Zotero, so you'd need to restore from a backup of those files (external hard drive, Dropbox file history, etc.).

    For what it's worth, if you do continue using Zotero, the standard approach for things like "review" or "supplement" would be to use tags in Zotero itself. Most people do rely on automatic renaming, often with the third-party ZotFile plugin, which offers sophisticated customizable renaming rules. (For linked files, I believe ZotFile does the renaming semiautomatically, so you'd have the option of transferring any extra metadata from the filenames into tags before renaming the files based on the parent metadata.)
  • I followed your latter approach: I opened Zotero, I clicked the green icon in the toolbar and pressed "Link to file". I did not use Zotero's Mendeley importer. I just downloaded Zotero, and my version is 5.0.64 (on Linux Mint). When I check the application preferences, I see that "Rename linked files" is disabled. But when I download a new paper and add it to Zotero (green + icon, "Link to file"), the original file gets renamed automatically.
  • Ah, that's no good. Due to a typo, the new pref was only being properly applied to files added as child attachments to existing items. Directly added linked files for which metadata was found were still triggering the previous behavior and being renamed. (Most people don't add files that way, which is likely why we didn't receive any other reports of this.) I've fixed that in 5.0.65, available now.

    Sorry for the hassle. Again, though, bear in mind that that's really not the way you'd want to migrate to Zotero, so if you want to continue, and you're able to recover from a backup of your files and/or want to start again, you should close Zotero, delete your Zotero data directory, do a Restore to Online Library from the Sync → Reset pane of the Zotero preferences to clear your online library, and then follow the recommended import steps.
  • Thank you for your prompt response. Recent changes (bugs?) in Mendeley caused numerous duplicates in my original Mendeley library, so I think importing my library from Mendeley at this moment would not be efficient. I don't have any notes or tags that need to be transferred. Dropbox doesn't seem to be able to restore these files, as technically they have not been deleted (they don't show up in the file history). So I guess I'll have to live with the new naming system, or spend a day or two renaming my files manually.

    Does Zotero offer any possibility of "watching" a directory for new PDFs? Or otherwise scan a directory and only import items that are not already present in the library? This is a strong feature in Mendeley, but I haven't found an equivalent feature in Zotero. Sometimes I download 20+ articles per day, and adding those individually each time would be a real pain and a recipe for disaster (I will likely forget half the articles I retrieved).
  • edited March 27, 2019
    So I guess I'll have to live with the new naming system, or spend a day or two renaming my files manually.
    Be sure to take a look at ZotFile for more renaming options.
    Sometimes I download 20+ articles per day, and adding those individually each time would be a real pain and a recipe for disaster
    That's just not really how you use Zotero. Zotero integrates tightly into the browser, so if you want to save something, you just click the Save to Zotero button while on the article page (or, sometimes, search results page), which will generally save both high-quality metadata and, if you have access to it, the PDF. You can also click Save to Zotero while viewing a PDF directly in the browser and Zotero will save it and try to retrieve metadata for it, but it's better to save from the article page when possible.

    If you want to keep your files organized in an external directory, ZotFile can automatically move downloaded files there as linked files, using a renaming scheme that you choose.

    If you haven't yet, I'd strongly recommend reading through Adding Items to Zotero to get a better sense of how this is all designed to work.
Sign In or Register to comment.