Switching Stored Files to Linked Files

Hello, I've been using Zotero storage for my pdfs, but I want to prepare for when I'm not at an institution with Zotero support.

I'm trying to move the stored pdfs in my Zotero storage to Onedrive, and use Zotfile to connect them to Zotero as linked files. Is there a way for me to download all the pdfs I have in Zotero storage at once, move them to Onedrive, and change the files in Zotero to ones linked from Onedrive via Zotfile?

Thank you!
  • Your PDFs will currently all be on your local computer under Zotero\storage if you are *not* currently using linked files - that local storage is the default, standard Zotero setup. PDFs will also be mirrored on Zotero servers, up to your online storage quota, if you have sync turned on for files, and that syncing is up to date. Are you only working on one computer ?
  • @tim820
    Thanks for your reply. I understand where the files are in my local storage--but they're each encased in separate folders that Zotero makes for the stored files. I'm trying to move all my pdfs to a Onedrive folder and use them as linked files, but there seems to be no way to download all the pdfs from Zotero because of the specific directory that Zotero sets up for each file.

    I've only used Zotero on one computer, but I am actually trying to use it on multiple computers from now on. I'm not sure if the linked files would work out if I did this. Can you help me?
  • edited September 7, 2023
    OK, just needed to confirm your current setup. BTW the important caveats regarding linked files are here:
    https://www.zotero.org/support/attaching_files#linked_files

    The movement of current (and future) PDF files from local to linked storage is exactly what Zotfile handles for you (and a new plugin when Zotero v7 is released - you may wish to wait until then). So as long as all your PDFs are currently in local storage on the computer you're on, Zotfile will be able to move them to the Custom Location you set in Zotfile preferences (Onedrive folder in your case - assuming you have sufficient space there). So there is no need to download PDFs that you already have - they're already where they need to be for Zotfile to do the work.

    To test, set that Custom Location in Zotfile preferences. Then take a small chunk of files to move first. eg sort you items by title or author, and just select all the A's. Then right-click Manage Attachments\Rename and Move (an option added by Zotfile). You should see a popup dialog in the bottom right, showing each file being moved. Depending on how many PDFs you have, you may need to do the whole move in chunks like that.

    Once Zotfile is set up, all future PDFs downloaded by the Zotero Connector will be automatically moved to linked storage.

    Note that Zotfile will also rename the PDFs (to its default style, unless changed) as it moves them (one of its strengths), unless you set 'Use Zotero to Rename' in Zotfile preferences.

    To work across multiple online computers, you leave Zotero data syncing turned ON (does not count towards your free online quota) but (PDF) file syncing turned OFF. The location of your linked PDF files is baked into each item's data. So as long as the linked PDFs are at the exactly same folder location on each computer (Onedrive for you) they will be found by Zotero. If the Onedrive file path is different on each computer, you point Zotero to look there for PDFs via Linked Attachment Base Directory in Zotero settings on each computer.

    As usual, you still need a good backup strategy for your data and files.

    As Zotero does not delete linked PDFs when you delete an item, you can use right click option added by the Delitem plugin for that.
    https://github.com/redleafnew/delitemwithatt
  • This is really helpful--thank you so much!

    I had just a few more questions.
    If I'm outside with my tablet but not my laptop (with a linked file for both laptop and tablet set to the same Onedrive folder), could I pull the file from my Onedrive via pdfexpert, annotate, and see the annotation synced on the Zotero laptop once I get home? I was wondering if there's any way to annotate and sync without having to set up the "send to tablet" via Zotfile on a desktop beforehand.
    Also, when using a tablet with linked files, is there an option to access pdfs directly through the Zotero app and not a third party pdf reader?

    And would the synced Zotero data amount to the same volume of data as the pdf files themselves?--my libary is nearing 10GB. I'm moving to an institution that unforunately does not have a group subscription to Zotero storage, so I was wondering if the linked files would help me use Zotero without a subscription.
  • edited September 7, 2023
    Linked files don't work with the Zotero iOS app (or apparently the coming Android app). But yes, you could read/annotate your PDF with *another* iOS PDF app if the PDF is accessible from Onedrive on your tablet. But you won't see any annotations in that linked-file PDF that were previously added via the Zotero PDF reader, as Zotero does not store annotations in the PDF file (unless you explicitly save them back to the PDF).
    https://www.zotero.org/support/kb/annotations_in_database

    If you do annotate a Onedrive-stored (linked) PDF in an external PDF app on your tablet, when you later get back to Zotero Desktop on your computer, Zotero will open it again as a linked-file PDF from Onedrive as previously, with the added annotations shown, but locked. If you want them imported to Zotero, you can select Import Annotations (but then they will no longer be visible externally on your tablet, as above).

    AFAIK there is no way to access linked PDFs within the Zotero iOS app (it has been speculated that a symlink-based strategy might be possible, but I have not seen it; and it would be a very advanced strategy).

    Note that Send To Tablet is apparently not planned to be in the v7-compatible version of Zotfile implemented in the new zotero-file plugin ...
    https://github.com/MuiseDestiny/zotero-file

    Linked PDF files do not count towards your Zotero online storage quota. Nor does Zotero data (so data syncing is free). Your sqlite file will remain on your local computer in your Zotero folder, and be synced online if you have data sync turned ON. Only attachment files under Zotero\storage count towards your online quota, if you have Zotero *file* sync turned ON.

    You can see your online storage quota and current usage here:
    https://www.zotero.org/settings/storage

    You can tell roughly how much attachment file storage you would require to store your current locally stored Zotero attachment files as linked files (elsewhere) by looking at the total space currently occupied under Zotero\storage in your computer's OS.
  • I don't mean to raise a dead topic here - but I don't think I have something set up right. I've attempted to switch from Zotero sync to the linked files method. I have ZotFile set up such that Location of Files - Custom Location: C:\[OneDrive folder], and Zotero Preferences - Advanced - Files and Folders - Linked Attachment Base Directory:C:\[OneDrive folder]. Based on what I've read on this thread, I would have thought that importing a pdf from the Zotero Connector browser extension would have automatically added that pdf to C:\[OneDrive folder], but it doesn't. What do I need to do to make that happen?
  • Firstly, is the PDF currently being saved successfully under Zotero\storage - that is, the problem is not related to the Zotero Web Connector ?

    For Zotfile to work, you just need the Custom Location folder to be entered *and* that option selected. A PDF downloaded by the Zotero Web connector will then be moved to that folder as a linked file. As that process comes on the end of Zotero's download process, it takes a little longer. If you expand the new item to display its attachments during those processes, you should see the PDF initially added in the normal way, but then renamed/moved/converted to a linked file (Zotfile will also display a popup message when it does that). If Zotero is also syncing the new item's metadata online at the same time (ie you have Data Syncing turned on in Zotero preferences), that may add a little extra delay.

    The caveats on that are:
    - Zotfile does not work beyond Zotero 6 (for the Zotero 7 beta, the current options are the attanger or zotmoov plugins).
    - under Zotfile's Advanced Settings, 'Only work with the following filetypes' should be either UNselected, or if ON, it must include the filetype you are trying to downloaded/move.
    - issues with Onedrive have been reported with some other Zotero-related operations (mostly the word processor plugin), so it's worth trying a non-Onedrive Custom Location first, if all else fails.

    BTW the Linked Attachment Base Directory setting has nothing to do with where linked attachment files are *saved*. It only affects where Zotero *looks* for linked files when you later try to open one. And a LABD setting is only necessary if their parent path is different on different computers. If you only work on one computer, or the linked files are at exactly the same path on every computer, you don't need a LABD setting.
  • I think this is actually simpler than this.
    For Zotfile to work, you just need the Custom Location folder to be entered *and* that option selected. A PDF downloaded by the Zotero Web connector will then be moved to that folder as a linked file. As that process comes on the end of Zotero's download process, it takes a little longer.
    This isn't exactly the case: if you actually use the connector to directly download a PDF -- i.e. you have the PDF open in your browser and click the Save to Zotero icon which is a pdf icon in that case -- ZotFile will not automatically move the PDF, even if Zotero is able to automatically retrieve the metadata for the PDF. You need to manually do that using right-click --> Manage Attachments --> Rename attached files. The same is true for dragging PDFs to Zotero from your file system.

    ZotFile will automatically move PDFs that are attached to items from the start, e.g. when you're downloading an item from its abstract/landing page and Zotero attaches a PDF. (This is also in most cases the recommended way to get items into Zotero).
  • edited March 27, 2024
    OK ... that Zotero Web Connector example with PDFs *currently open* in your browser is another caveat I guess. ;) I can't recall that I've ever struck that one, because I almost never open a journal article PDF in my browser, and then download via the Web Connector from that open PDF page.
  • ( we actually get this scenario a fair amount here)
  • Ah, bummer. Yeah my typical use case is to browse journal articles either directly from the journal website or from a Google scholar search, and when I find ones that pertain to my research or that I want to read deeper I use the Zotero Connector plugin to save to a Zotero collection.

    ZotFile will automatically move PDFs that are attached to items from the start, e.g. when you're downloading an item from its abstract/landing page and Zotero attaches a PDF. (This is also in most cases the recommended way to get items into Zotero).


    Not sure I understand. Are you suggesting to use Zotero connector on the journal article landing page on the journal website for the at article to retrieve the article as a pdf, instead of clicking to open the pdf and then using Zotero connector?
  • Are you suggesting to use Zotero connector on the journal article landing page on the journal website for the at article to retrieve the article as a pdf, instead of clicking to open the pdf and then using Zotero connector?
    Yes, exactly. You should only rarely use Zotero on PDFs directly. In almost all cases where you have access to a PDF, Zotero will automatically attach it as you're saving from the landing page.
Sign In or Register to comment.