Broken File Paths after Google Update

So I've been dealing with this issue sporadically for months and finally sat down to figure it out. Thought I would post this here in case it's helpful for someone else. This experience relates to Windows 10/11 users and likely only applies to people who use Zotero similarly to the way I do described below:

I'm a Ph.D. student in history and read a ton of books on a regular basis, which I use Zotero to track. This includes many PDFs which I store via Zotero in which I use Zotfile and Zutilo. Zotfile links the PDF to a cloud storage space (Google Drive) and Zutilo retrieves PDF annotations (for those who don't know). Anyway, I set this all up back when Google Drive was linked to the desktop via "Backup & Sync." I can't remember which way I did it, but I think I created the folder on Google Drive and then shared it with my desktop via Backup & Sync. This folder was accessible on all of my devices so that I could annotate a PDF on my tablet and save it to GD which I could use to extract the annotations into Zotero on my desktop. I'm describing this setup in detail in case there is something belong that I don't understand and explain incorrectly.

So this was the setup I used before I took a several months long hiatus from graduate work for various personal reasons. During this time (I think October), Google updated its backup system and replaced Backup & Sync with "Drive for desktop." When I got back to working on my dissertation, I started noticing issues with some of my Zotero files as I tried to access PDFs I had previously read and stored.

Turns out, the switch from Backup & Sync to Google Drive directly on desktop screwed up the file pathways for all of my PDFs. This was awhile ago, but I vaguely recall first having to reset my Zotfile preferences to adjust for the new pathway. But I didn't immediately put 2 and 2 together that this was what was causing existing file locations to corrupt. When trying to open a PDF via Zotero (double clicking a parent entry with an attached PDF file that had been renamed by Zotfile), I would get a "File Not Found" message saying

"The attached file could not be found at the following path:
C:\Users\[my name]\Google Drive\Zotero Library\[File Name].pdf
It may have been moved or deleted outside of Zotero, or a Linked Attachment Base Directory may be set incorrectly on one of your computers."

You have the options: "Locate..."; "More Information"; or "Cancel." Locate essentially just opens File Explorer. More Information opens this web link: https://www.zotero.org/support/kb/missing_linked_file.

Before going further, I'll mention that the files were still located in the correct locations within the Zotero Library folder I created on Google Drive and were accessible from my computer. If I clicked "Locate..." and Google Drive > Zotero Library > File Name > Open, the problem would resolve and Zotero would correct itself with the correct path. However, I have hundreds of PDFs saved and to do this every single time I need to access something I've read previously is incredibly tedious. So...

At the bottom of the webpage linked above, it says "If necessary, the third-party Zutilo plugin can be used to fix attachment paths in batch." It took me a bit, but I figured out how:

Go to Tools > Zutilo Preferences > User Interface and make sure "Modify attachments" is checked in the "Zutilo context menu" before clicking OK.

Next, locate an item with a broken pathway in your library that you need to fix. Double click and make sure you have the old pathway on hand. You can get this from the "File Not Found" message. In my case: C:\Users\[my name]\Google Drive\Zotero Library\[File Name].pdf.

Once you have the old pathway copied or written down, right click the collection item > Zutilo > Modify attachment paths.

A window appears: "Old partial path to attachments' directory to be replaced:"

Enter the old pathway (Example: C:\Users\[my name]\Google Drive\Zotero Library). Click OK.

Another window will appear with "New partial path to be used for attachments with paths matching the old partial path:." Enter the path you have set in your Zotfile preferences. In my case, this was "G:\My Drive\Zotero Library." Click OK.

Once you've done this, the path from the parent item to the attached PDF should be fixed and the PDF should open directly from Zotero again. This process can be done in batches, but there have been a few times where not every item was fixed thus far and I had to go back and do that one again. Not sure why....

In retrospect, the issue appears to be that when Google updated, the file location for Drive itself changed and this was the root of my issue since the new path no longer matched the one under which my PDFs had previously been filed via Zotfile.

If there is an easier way to address this that bypasses this whole process, please let me know, but for my purposes, the bulk of my files have already been corrected with some stragglers that I'll address over time as needed. Otherwise I hope this is helpful to others who have been dealing with the same issue and, like me, haven't had the energy or time to sit down and try to fix it.
  • If there is an easier way to address this that bypasses this whole process, please let me know
    You can save linked file attachments with a relative path if you set up a Linked Attachment Base Directory. You'd only have to update the base directory in the preferences in case it changes.

    For troubleshooting issues with linked files, see here for an explanation of the Zutilo add-on's relevant functions.
Sign In or Register to comment.