ZotFile - Advanced PDF management for Zotero

  • From: jkukavica1 "@Bellthorpe Has the issue of truncating highlights been remedied after changing to Acrobat? I have been having the same issue with Preview".

    No problems at all with Acrobat. And I find its search feature much better. So I'll ditch Preview for this purpose, although I still use it when needing to delete/reorder/merge pages.
  • @Bellthorpe You made my day. Thanks!
  • Hello everyone, and sorry for my English.
    I am using Zotfile to classify my pdf library, and I have a question. By default, Zotfile allows you to replace blanks with underscores by checking the "Replace blanks" option.
    I have read several recommendations on this, which advise the use of dashes instead of underscores to name files:

    (in the comments, they cite ISO 8601)




    Therefore, I would like to know if there is any way in Zotfile that would allow the blanks to be replaced by dashes ("-"). In the future, if I am allowed the suggestion, it would be interesting to have the option of choosing underscores ("_") or dashes ("-") to replace blanks.

    Thank you, and thank you for developing and improving this plugin.
  • edited 11 days ago
    Hi folks

    I use zotfile to rename attachments and move them into a cloud folder ...
    I use my own renaming convention: {%a_}{%y_}{%t}.

    This works well when there is one attachment, but if there are two, then they both appear in zotero with the same name, although two files appear in the file, so we have, e.g.

    Paper title:

    appearing in Zotero, and


    appearing in the folder.
    (This all on MacOS using the latest zotero.)

    I cannot get to the second pdf file from within zotero ... clicking on either of the the attachment names simply gives the first (not suprisingly). Obviously I can get at them from the file system.

    Is this a bug, or have I set this up wrong somehow?

    Thanks in advance,

  • @santiago.villaperde -- You can definitely change the character between elements to - by changing the renaming format, but I'm not sure if you can change what ZotFile does within elements.

    FWIW, the recommendation for hyphens over underscores only refers to files on the web (where google prefers the former). And you're misreading at the first post you link to: ISO8601 is only about time & date, so they refer to the fact that dates should be in the form YYYY-MM-DD this has no bearing otherwise on file names.
  • @b.n.lawrence
    Is this a bug, or have I set this up wrong somehow?
    Pretty sure this is a bug. This used to work correctly.
  • edited 6 days ago
    (So, all Zotfile questions go in this one thread?)

    1. How can I setup Zotero and Zotfile such that: When I add an item using Zotero's browser connector, Zotero will download the associated PDF to a folder watched by Zotfile, and then Zotfile will rename the PDF, move it to a custom folder, and attach a link to the item just added in Zotero?

    2. Can I have Zotfile rename such that (a) the first alphabet of each word in the journal name is used (b) only some parts of the title are used with a dash separating each word?

    Haugen, M. J., G. A. Bishop, A. Thiruvengadam, and D. K. Carder. Evaluation of Heavy- and Medium-Duty On-Road Vehicle Emissions in California’s South Coast Air Basin. Environmental Science & Technology, 2018. https://doi.org/10.1021/acs.est.8b03994.

    Thus, above item would have a PDF renamed as:

    My current renaming rule is:

    And that produces a PDF name of:
    Haugen_2018_Environ. Sci. Technol._Evaluation of Heavy- and Medium-Duty.pdf

  • 1. I don't understand the first part of this. The way ZotFile works is by taking files downloaded to Zotero (storage) and moving+linking them. How does the watched folder play into this? The functionality you describe (minus the watched folder) is possible simply by setting up a custom location in the general tab of ZotFile.
    2. At least not with reasonable ease. Maybe you could get a custom wildcard to do this, but it'd have to be pretty involved.
  • 1a. It's possible I am assuming some automatic Zotfile functionality that does not exist or not describing my intended workflow correctly. Currently, I (a) save an item via the browser connector, (b) manually download the PDF to my custom folder - C:\Users\username\Downloads\Firefox, (c) go to the item in Zotero, right-click and ask Zotfile to attach the latest downloaded PDF as a link. I am wondering if all three can happen in one-click. Maybe you are suggesting that I let Zotero automatically download the PDF to my Zotero/storage as "attached copy of file" and then have Zotfile do the rename and move? So that brings it down to two steps from the current three steps?

    1b. I also have many hundreds of items in Zotero for which I have not downloaded the PDF. What the best way to download the PDF, rename, and attach as link for these already existing items? Should I use the "Find available PDF" function from the right-click menu, let Zotero do it's thing, and then use Zotfile to rename and move?

    Note: For both 1a and 1b, I am trying to avoid sending anything to my Zotero/storage folder since ultimately I want everything to be attached as a link. And I suspect sending to the storage folder first and then moving the PDF will still leave behind a folder with no purpose. Or maybe Zotero in any case has a folder for each attachment even when it is attached as a link? Currently I have a couple thousand folders with only two files in each (.zotero-ft-cache and .zotero-ft-info).

    2. Is the journal name part difficult or the title part or both?

  • 1a) Just have Zotero download the metadata _with_ PDF and have Zotfile set up to rename & move automatically. The file will technically briefly be in your storage folder. I'm not sure why you think having the ft-cache and ft-info files are a problem -- they're needed for full text indexing, and I think Zotero would create them either way.
    1b) yes, that's right. ZotFile won't auto-move PDFs retrieved that way, so you'll need to do that manually via right-click, but you can do so in batch

    2. both, probably the title is harder, but both require significantly changing the string in question.
  • 1a. Will try and report back if I have issues

    1b. Guess what, it all happened in one step! I selected a bunch of items, right-clicked and selected "Find Available PDFs". The PDFs were download, renamed per Zotfile rules, moved to my PDF folder, and attached as a link.

    2. Okay, thanks.
  • Is it possible to configure that the moved files are automatically deleted (and the directory if it is empty) when i delete the record?
Sign In or Register to comment.