ZotFile - Advanced PDF management for Zotero

  • This isn’t a bug. You are correct—%a doesn’t distinguish between author and editor for books because many books only have editors. You could write your own custom wildcard to always only use authors, but that would require some fairly complicated regular expressions.
  • Rename syntax seems to have bugs in current ZotFile version (5.0.10) which previous worked fine in earlier editions (sorry, new computer, not sure of which earlier Zotfile version I had)

    When using anything but _ in the rename syntax as a spearater within {}, nothing happens between fields. For example, if I want a space after every author name before the delimiter, I'd enter {%a } previously:

    ({%a }{%y}) {%t}

    (AuthorA & AuthorB Year) Title

    But now, same formula gives:

    (AuthorA&AuthorB Year) Title

    if I try to change the delimiter between multiple authors (from & to " & ", I get no effect)

    Expected behavior is having a space (or whatever else is in the {} but after the wildcard) between each author and the delimiter just like I would do in an in-text citation

    Screenshots here: https://www.dropbox.com/s/xo3ojq4sk6pvc4z/Annotation 2019-08-13 122741.png?dl=0

    https://www.dropbox.com/s/yn9dbr2c3qx85kb/Annotation 2019-08-13 122902.png?dl=0

    (update was pressed each time, note in second one that changing the delimiter to a + has no effect at all, & seems stuck)

    Windows 10 1903 (10.0.18362 Build 18362)
    Zotero 5.0.73
    Zotfile 5.0.10
  • Greetings,

    Using Zotfile, this particular behavior has me stumped.

    "Add Attachment from Source Folder" is not storing newly renamed filename within the Zotero database for some imported PDFs. It instead stores the original PDF's filename, i.e. the original filename of the "source" PDF before having been imported. The result is that Zotero cannot link / find the PDFs in it's database.

    MacOS 10.14.5 (Mojave)
    Chrome Version 76.0.3809.100 (Official Build) (64-bit)
    Zotero Standalone 5.0.73
    Zotfile 5.0.10
    -- also tried Zotfile 5.0.9, same behavior

    My general workflow for a lot of news outlets (NYT, WSJ, etc) is to make a PDF of a particular article, which gets saved to my Downloads folder from Chrome. I typically do this one of two ways:

    1) Usually with Chrome Print dialog and choosing "Save to PDF". This PDF goes to my Downloads folder in my home directory.

    2) Sometimes for certain cites, I instead use a plug-in called "Print Friendly & PDF". Aside: I find that for a lot of sites that have a fair amount of "noise" / extraneous info, etc, this plug-in does a very good job of distilling the actual info. as well as photos. The output of this is also saved to my home directory Downloads folder.

    I then use the Chrome connector to make a database entry in Zotero, and from there, use the "Add Attachment from Source Folder" to pull in the PDF and associate it with the item's database record.

    If I use method 1 above (Chrome Print Dialog), the process ALWAYS WORKS.
    If I use method 2 above (Print Friendly & PDF), the process OFTEN FAILS.

    How things seemingly fail is that in the database record for the PDF -- instead of storing the new renamed filename -- instead reflects the original PDF's filename, i.e. the "source" filename that was input to the "Add Attachment from Source Folder". Then, when I try and trigger the PDF to open in Zotero, it is unable to find the PDF file, and shows an error message (truncated here for brevity)
    "File Not Found. The attached file could not be found..."

    This occurs whether or not Zotero or Zotfile is doing the file renaming when "Add Attachment from Source Folder" is employed.

    However, if I add the "problem" PDF to Zotero instead with Zotero's built-in "Attach Stored Copy of File", whether Zotero or Zotfile does the actual renaming, it matters not -- THE RESULT IS ALWAYS A SUCCESS.

    I've occasionally gotten the Print Friendly generated PDFs to work using imports via "Add Attachment from Source Folder", but I cannot find a pattern as to why.

    I ran some tests and screenshots, exported Zotero database records, and included an entire log file which tracks the behavior. I also included the PDF test files pre and post import for both a success and failure case, which could easily be tested on another system.

    All of the above are included in a .zip file found here.

    Please let me know if there is any more data I can provide you to help debug this behavior. Zotfile has been a great help to me, and I appreciate its flexibility.

    Any insights appreciated.


    -- madison
  • Hi, thank you for this great extension.

    I would like to know if there is a solution to @YiFongAu's question on page 54 (https://forums.zotero.org/discussion/comment/288940#Comment_288940). To restate it, I would like to be able to send multiple PDFs at once to my tablet, while keeping the folder tree structure of Zotero collections and subcollections. At the moment all the PDFs get sent to a folder corresponding to the collection path of the first selected PDF.

    Thank you!
  • edited August 22, 2019
    Hi there! I'm reporting a bug for the "(Batch) Rename and Move Attachments based on Zotero Metadata" function. I believe the batch feature is broken.

    I'm using the Standalone Zotero with ZotFile on a Windows 10 laptop. I've recently changed to a linked attachment system with my attachment folder on Dropbox.

    Therefore, I'm attempting to transfer all files attached to items in my library to this new Dropbox folder. When I go through them one-by-one via Manage Attachments --> Rename, it works, and they show up renamed and in the correct folder.

    However, when I select multiple items and try to do the same process, renames 1-3 items and never gets through the next one. There's no error message, but the name of the first file that did not sync is permanently greyed out in the "Zotfile: Rename Attachments" Pop-up. The following files do not show up on the pop-up and do not sync at all.

    Does anyone have a fix for this? Thanks!

    EDIT: This seems to always occur when a PDF file has a tag directly attached to it (as opposed to only to the parent item). Then, it breaks the renaming process and none of the attachments after it sync correctly. However, it still happens at other instances where I haven't been able to determine a common denominator.
  • I don't understand how to batch move files to a new directory. I have all my PDFs in the /storage folder in Zotero, and I want to move them to Google Drive as linked file. How do I do this? I'm on a Mac
  • Hi, I believe that the "update file modification time" syncs the file modified from the tablet folder to the zotero library. But do not syncs if the file has been modified in zotero library (after sent do tablet) in the tablet folder.
    It would be a nice feature.
  • Recently upgraded Zotfile to from 5.0.10 to 5.0.12, and the "Add Attachment from Source Folder" option is gone. Tried 5.0.11 and found the same issue. Downgrade back to 5.0.10 and the option appeared again.

    Uninstall, deleted Zotero folder, and reinstalled the newest version(5.0.76), still the same for 5.0.11/12 version of Zotfile. Is the option moved?
  • Hi, version 5.0.12 seems to have broken the ability to open a pdf using the links added to the extracted annotations. I checked the links and verified that syntax is correct and they point to the right item key, but when clicking on them nothing happens. I wonder if others are having the same problem.
  • For everyone experiencing problems with 5.0.12: Update to v5.0.13 and report any remaining issues here. Note that opening PDFs is now handled by Zotero. That means the zotfile preferences 'openPdfWin', 'openPdfLinux', 'openPdfMac_skim', 'openPdfMac' are obsolete now. If you report an issue, try to also include any zotfile-related error from Tools->Developer->Error console.
  • So I just updated Zotfile to 5.0.13 and the "Add Attachment from Source Folder" is still missing. Zotero version is the same: 5.0.76.

    Only 3 messages found in error console:::
    1.: Timestamp: 2019/10/27 PM 09:08:05
    Warning: unreachable code after return statement
    Source File: resource://gre/modules/commonjs/toolkit/loader.js -> resource://zotero/bluebird/util.js
    Line: 201, Column: 4
    Source Code:

    2. Timestamp: 2019/10/27 PM 09:08:05
    Warning: unreachable code after return statement
    Source File: resource://gre/modules/commonjs/toolkit/loader.js -> resource://zotero/bluebird/util.js
    Line: 201, Column: 4
    Source Code:

    3.Timestamp: 2019/10/27 PM 09:08:05
    Warning: Unknown property ‘user-select’. Declaration dropped.
    Source File: chrome://zotero/skin/overlay.css
    Line: 647, Column: 12
    Source Code:
    user-select: text;
  • Should be there. It's now called "Attach New File"
  • I'm interested in getting journal title (and other title) abbreviations to use with zotfile for renaming PDFs and found that I could leverage Zotero's `Cite.getAbbreviation` function.

    Here is a pull request (work in progress) that implements this feature so that there is an additional "transformation" to use for creating user-defined wildcards for renaming:


    Would love to get input from users and devs!
  • edited November 12, 2019
    Love Zotfile!

    Appears to have stopped working with Zotero update: 5.0.77

    Not sure these are relevant but....

    Timestamp: 11/11/2019 10:35:24 AM
    Warning: Key event not available on some keyboard layouts: key=“i” modifiers=“accel shift alt” id=“key_importFromClipboard”
    Source File: chrome://zotero/content/standalone/standalone.xul
    Line: 0

    [unrelated errors removed — D.S.]

    Thanks, JS
  • Jeff: You'd have to say more about what exactly isn't working for you. ZotFile still works in 5.0.77 in general. Make sure you're running the latest version of ZotFile.
  • edited December 2, 2019
    Hello, I have an unusual bug to report. When I click on the "Tablet Files" or Tablet Files (modified)" smart folders created by ZotFile, I get the following error in the lower right hand corner of the Zotero window:

    ZotFile Error
    The file "/Users/../ZotFile/filename.pdf" does not exist.

    This happens on every click of these folders. Unfortunately, I have not been able to duplicate the error with other files. I have tried:

    - Reinstalling ZotFile and changing the base folder in Tablet Settings
    - Deleting the offending file
    - Deleting the file and emptying the trash
    - Checking for tags or metadata that might be causing the bug (file was not renamed, no _tablet tag on the file.)
    - Checking the smart folder criteria for anything unusual
    - Deleting and remake smart folders
    - Deleting the entire library and emptying the trash (reimported afterwards)
    - Giving Zotero full disk access in macOS System Preferences (suspecting it just couldn't access the "Documents" folder).

    The Error Console only has a JavaScript Warning:
    "unreachable code after return statement" {file: "resource://zotero/loader.jsm -> resource://zotero.bluebird/util.js" line: 201 column: 4 source: " eval(obj);

    and there are no logged errors in the Zotero Error Report. When I do change the base folder in ZotFile Preferences, there is a Javascript warning that states:

    [JavaScript Application]

    You have changed the location for tablet files. There are 1 files in the old location. Zotfile currently does not move these files to the new folder. I recommend that you first get them back from the tablet.

    Do you want to proceed and change the tablet folder now?

    I have navigated to the base folder in Terminal and done "ls -a" to see if maybe there was a hidden file there, but the directory is empty. Somehow it thinks there is a file in the base folder, even after I change it to a newly created, empty directory. Any idea what's going on?

    Thank you,


    Software Versions:
    ZotFile 5.0.14
    Zotero 5.0.78
    macOS 10.15.1
  • hi
    new to zotfiles i wonder if it's normal that only a part of my higlights ara exported when i use it. the 200 first one actualy. maybe there is a option i mis understood.
  • @garrekds I'm having the EXACT same issue! About 8 files total. Tried everything! Let me know if they catch the bug! Thanks.
  • request: renaming using journal ACRONYM consisting of first letter of the journal name

    I like zotfile very much. However I think instead of %s for journal abbreviation, a simple initialism that uses the first letter of each word in the journal title is more useful to avoid long journal names.

    can this be done?
  • @htwanz You could do that yourself using user-defined wildcards, along with some regex: http://zotfile.com/#user-defined-wildcards
  • I seem to be having an issue. I am running the latest version of both Zotfile and Zotero on Windows. I use Zotfile to send files to my iPad. I like to create subfolders for the files to be organized into. I recently tried to go into zotfile preferences to remove some old folders and add some new and the dialog box is appearing, but not usable. All I see are the buttons move up, move down, +, and -. The dialog box is also flashing constantly. See a screenshot in the link below (of course I can't recreate the flashing in a screenshot).


  • @jadoff: Make sure you're using the latest version of ZotFile, currently 5.0.14.
  • @dstillman. I am on version 5.0.14 of Zotfile and 5.0.80 of Zotero. Anything else that could be causing it, or anything that could fix it?
  • edited January 9, 2020
    @jadoff Same problem here, with Zotfile 5.0.81 and Zotfile 5.0.14.

    And I did the same thing before: deleted a bunch of old folders. Any idea how to fix it?

    I tried resetting extensions.zotfile.tablet.subfolders to blank; the box stopped jumping, but the list was missing and the problem came back when I added a new folder.

    Edit: While haven't fixed the dialog box, I managed to add folders manually by editing extensions.zotfile.tablet.subfolders. Adding files to the tablet and getting them back seems to work fine.

    The config format is: [{"label":"test1","path":"\\test1"},{"label":"test2","path":"\\test2"}]
  • @Larisa @adamsmith

    Although I realize the primary use of Zotfile is managing linked files, I only use the annotations and tablet functionality, and do nearly all of my writing through Group libraries.

    So, this is a request to enable the tablet functionality for Group libraries. It would be a big help.

  • @jadoff, @darcyparks: I've submitted a fix for the "Change subfolders" window.
  • @dstillman Thanks so much. How do I go about getting the fix in my zotero install? Do I redownload the install file or is there soemthing else I have to change?
  • You need to wait until it's accepted by the ZotFile developer and a new version is pushed.
  • okay. thanks so much! would downloading the development version from github have it?
This discussion has been closed.