Use Zotfile to rename linked pdfs without copying/moving them?

Hi,
I'm new to Zotero (used Mendeley for years and recently got super frustrated with their proprietary angle). Zotero seems great, so thanks for all the hard work!

The short version of my question is: "can I use Zotfile to rename linked pdfs without copying/moving them?"

Longer version with more context (and hopefully some explanation/defense of why I want to do this in the first place!):

I'm using a Mac laptop (10.15.7) and the standalone Zotero app (5.0.96.3). I just downloaded Zotfile yesterday, to attempt the following workflow:

1) Download a pdf to one of several possible file locations on my laptop, which I choose based on the pdf's content (* see my reasoning for multiple folders below, if needed)
2) At some regular interval (once a week), batch add new pdfs I've downloaded into Zotero as links (** see my reasoning for links vs. files below, if needed). I know that I'll need to do this for every file I've added pdfs to, and I'm happy to do that, since there won't be hundreds of different files and it'll be easy to just sort each file by 'date added' and then pick the recent ones to add
3) Use the right click/manage/rename option to have Zotfile rename the pdf files in their respective folders according to the format 'year_au_journal.' FWIW, I really do want the year to come first, because often for teaching I need to find the more recent pdfs quickly. Renaming according to year will automatically organize the pdfs in a given folder from oldest to newest.

I thought this would work great, based on some previous advice (from another user? bwiernik) to simply set Zotfile preferences to be a 'custom' location, but then not enter anything for that field. Here is the source of that advice (see the June 11 comment):
https://forums.zotero.org/discussion/59824/zotfile-duplicate-pdf-when-renaming

This half works, in that the pdf is now renamed within Zotero...and I'm pretty sure that my settings are 'correct' in that there is no copy of the pdf being created/renamed elsewhere (*** see how I think I know this below, if needed).

The problem is that the actual pdf, in the folder where I put it, is NOT renamed. It still has its 'nonsense' name that it got during the download process. I am not excited about manually renaming every pdf I download...although maybe that's what I'll have to do...

It's important to note that another user had the exact issue I have, back in late 2017. Here is their description:
https://forums.zotero.org/discussion/68517/zotfile-renaming-linked-files-but-not-moving-them

Based on this discussion, it seems like the problem still persisted in Sept. 2018. Is there any fix or workaround to this? It seems like 'renaming in place' is such a simple thing, and it apparently worked just fine before Zotero 5.0, so I'm wondering if I'm missing something!

It's worth nothing that I am open to other solutions/workflows, too. The only two critical features for me are (1) a content-based pdf file organization that can be navigated outside of Zotero, and (2) a renaming scheme that puts the year first.

Thanks so much for reading all of this! Please let me know if there's other info that would be helpful to know.

p.s. It might seem like 'what's the point of Zotero if you're manually organizing your files anyway'? Aside from the citation feature (which I need when writing manuscripts), it's important to note that I'm only half-organizing the files - just binning them into say 10 or 15 major categories at the moment I've downloaded them. Within a given set of pdfs, the tag feature is incredibly powerful for me - especially since it will allow me to assign multiple 'categories' to a given pdf. For example, if I have a folder with ~800 pdfs that are all related to my research system (vs. the classes I teach, or pedagogy)...I want to be able to find the 20 that I've tagged as both "nematode metabolism" AND "microscopy".

p.p.s The idea of 'tagging' pdfs into the folder structure I've described within Zotero, and then not having an actual folder structure, is an option I've considered. It isn't appealing for two reasons. First, it introduces the potential for lost info - when Mendeley stopped working for me, I lost all of my tag info, and I never want that to happen again - I at least want my files to be binned into the major categories independently of any software (Zotero support does seem fantastic, but these things can happen!). The second reason I don't love the option of creating a fake folder structure via tagging in Zotero is that it won't let me visually preview the pdfs in a given folder. This goal is also described in the note "*" below, but briefly here: when I'm looking for a paper, I often want to use the space bar and arrow keys to actually see the first pages of a whole series of docs from 2016...because my visual memory will recognize the paper I'm looking for, even if my tagging system didn't catch it. When the 100 research pdfs that I have from 2016 are all jumbled - either into separate 'author' files, or in a single folder of 2,500 pdfs covering totally different topics, or both - this visual search is impossible.

* Why multiple folders? First reason is that I teach very different classes, plus do my own research, plus read about pedagogy, and I frequently need to access and choose the actual pdfs for sharing with students/colleagues. Since I think about the papers I'll share by topic, not by author/year (e.g. I know that I need to find 'that review on inflammation, from ~2017'), it's very helpful to have a subset of pdfs, e.g. the ones related to 'teaching Immunology', in their own folder. (The students rotate a lot so it's not feasible to do 'shared Zotero libraries.') Second reason for multiple folders is that it's efficient for me to 'bin' a pdf into the appropriate location in the exact same step where I'm downloading it (since Mac will let me choose the location where I save a downloaded file, each time I choose to download). Third reason is that I'm a super visual person and often want to quickly 'preview' a set of related pdfs as I'm deciding what I need to read next / what I should share with a student / what I should choose for an exam pdf / etc. This is really hard when the pdfs are nested within 'author' folders, or else all jumbled together in one location. Since Zotero doesn't have a built-in preview option (which is fine - I get that it's not always needed, and it's a different sort of problem than file organization), I'd *really* like to keep the pdfs themselves at least somewhat sorted by content.

** Why linked versus copied files? Since I want a pdf file structure (see above), my reading of Zotero discussion forums suggests that linked files is the best way to do it. See for example the comment from adamsmith here:
https://forums.zotero.org/discussion/comment/197174#Comment_197174

*** Why am I pretty sure the file is not being renamed somewhere else? Two reasons. First, when I use spotlight to search my entire mac for the supposedly new file (say "2017_Johnson_JIP") nothing comes up. Second, when I ask Zotero to show me the file location for "2017_Johnson_JIP" it directs me to the original pdf, with its 'nonsense' name (say "s12597458735_511").
  • I think you're right this is broken in ZotFile, yes.

    Since you rely on a fairly simple renaming option, using Zotero might be an option?
    You can set Zotero's attachment renaming string using a hidden preference:
    https://www.zotero.org/support/preferences/hidden_preferences
    and that definitely works on linked files.
  • Thanks for the fast & helpful reply!

    I've tried this and I have three follow-up questions.

    First - and this is the only really essential issue - I think I am doing something wrong in terms of getting Zotero to rename a linked file in place:
    - I found hidden preferences and changed the string order. (This seems to have been saved correctly, since the new preference still shows up when I quit Zotero and then re-open it and take a look at hidden preferences again.)
    - I also went into Zotfile preferences and re-checked the box that says 'have Zotero rename files.' (This also seems to be working, because within Zotero, the file is now named with dashes and spaces...as Zotero would do...instead of with underscores and no spaces, as I'd set up Zotfile to do.)
    - BUT - the file in the folder still has its nonsense name. And when I ask Zotero to show me the source for the renamed file, it directs me to that nonsense file. (So it's not making a renamed copy elsewhere, as far as I can tell).

    I'm guessing there is a third preference I need to change in order to have Zotero rename a linked file in its original location...??

    Two much smaller questions that would be neat but are purely aesthetic:
    - would %j give journal name, just as %t gives title, in the string?
    - is it possible to have the renaming remove spaces and/or use underscores instead of dashes?

    Thanks again, so much.
  • How are you renaming? Don't use Manage Attachments --> Rename (that's the Zotfile one). Instead use "Rename using parent metadata" which is the Zotero native option. That works for me.

    For the other question, no other wildcards like %j aren't currently available and
    yes, '{%y_}{%c_}{%t{50}}' would remove spaces and use underscores
  • Amazing!!

    This works beautifully - thanks for your help!

    Since it turns out I'm not using Zotfile for renaming purposes, would you recommend uninstalling it?
  • I'm not 100% clear on your workflow. Aren't you using it to auto move and link files?
    The other thing it does that is useful is to extract pdf annotations to notes. That's built into the next version of Zotero, but if you want it now, you need Zotfile (or to use the Zotero beta)
  • I don't think I'm using Zotfile to 'auto move and link' - although maybe I should be? My anticipated workflow was:
    1) manually decide which folder to save a downloaded pdf to, at the moment I download it
    2) add all newly downloaded pdfs as links in Zotero, at some regular interval - also done manually, but as a 'batch' for each given folder

    My understanding of Zotfile is that it could watch a single designated folder, and automatically add stuff as links from there...but that there's no option to have it add things from multiple files. Am I mistaken about that??

    (I don't mind keeping Zotfile around, I just didn't know if it would be smarter to uninstall it, for some computational reason that I'm not aware of.)

    Thanks again for all the support.
  • I just realized that I've got one more renaming question.

    Is there a way to select ALL attachments for a list of items, and see/use the 'rename using parent metadata' option?

    I can manually 'expand' a whole bunch of items (one by one), and then command-click each pdf (again one by one), and then right click to see 'rename using parent metadata'...but there must be a way to do this for 100s of entries at once...?

    FWIW, I do see the Zotfile renaming option when I select all items in a list and right-click - I just don't see the Zotero option - the Zotero one only appears when I've got the pdf itself selected.
  • My understanding of Zotfile is that it could watch a single designated folder, and automatically add stuff as links from there...but that there's no option to have it add things from multiple files. Am I mistaken about that??
    Zotfile used to try to do that, it never worked well, so that got discontinued.
    I can manually 'expand' a whole bunch of items (one by one), and then command-click each pdf (again one by one), and then right click to see 'rename using parent metadata'...but there must be a way to do this for 100s of entries at once...?
    You can expand all using the + sign on your keyboard.

    Alternatively, you can use Advanced search --> Attachment File Type --> is --> PDF, create a saved search and select all (cmd + a) in there, and then use the right-click Zotero option.
  • I just wanted to close the loop here and say that I've been using the workflow you suggested, and it's working well for me. Thanks again for such a great program AND for the great online support!
  • Hi, I had the same issue. Your first solution of editing the Zotero properties works pretty well!

    Since Zotfile seem to be unable to just rename by keeping the linked files in their original directories as Zotero does, would it be possible to edit ZotFile properties or script to leave untouched the linked folder structure but just renaming the files?

    It would be great since ZotFile allows to perform some check like author length and adding custom text when needed (like 'et al' expression)
Sign In or Register to comment.