"File(s) not found..." after changing location of PDF attachments

Hi, I reconfigured the default folder in which I store PDF files that I subsequently import into Zotero, say, from folder A (which happened to be inside Dropbox which I read is a no-no) to folder B which is in the default/recommended Zotero folder (c:\users\myname\Zotero\B). The resulting problem is that for a great many citations/references, when I try to access an attachment-- most frequently an annotated PDF--I get the error message: "File not found… It may have been moved or deleted outside Zotero..." [plus two other possibilities which definitely do not apply]. Finally, I am given three buttons: Locate; More information; Cancel. The seemingly obvious choice is Locate, but when I click it, the pop up box immediately disappears without providing the expected opportunity to browse to the desired location. Clicking "More information" takes me to this website, where I have not been able to find an answer or fix.

Specifically, I would be most grateful to learn: (1) a way to batch-cycle through all 900 of my entries and everywhere to change the location of attachments to folder B and its subfolders. (They are a perfect replica of folder and subfolders of A, my original default). Or (2) any other, presumably more laborious, method short of manually reattaching each of hundreds of lost or misplaced attachments. For instance, it would be dandy if the Locate button work and had a checkbox for changing the path from A to B for all orphaned attachments. Thanks to anyone/everyone who is kind enough to offer assistance.

kk [PC version 5.0.59]
  • 1) Look at the Zutilo add-on: https://github.com/willsALMANJ/Zutilo

    But you also seem to have misunderstood the problem with Dropbox: if you just link to files on Dropbox from Zotero, that's perfectly fine. The problem is placing the Zotero database -- i.e. the Zotero data folder -- into Dropbox, which it doesn't sound like you did.

    In fact, I'd actually very much discourage you to manually place anything into the /Zotero folder.
  • Dear esteemed author of Wealth of Nations. Thanks very much for the tips, I have laccordingly moved my sizable accumulation of PDFs, preserving their hundreds of sub-folders structure. from B in the main \Zotero data folder back to A within Drobox. This was the configuration when most of my data were imported. Inexplicably, however, I still get the "File not found" error followed by the disappearing-box act when I click on the Locate button. A specific typical situation is I have two attachments: one link and and one pdf. You can see the path/location of the to-be-attached pdf from within Zotero (desktop version) by looking at the link's path and filename. This is almost always it should be, saying the file resides beneath what I have been calling folder A, now outsize \Zotero. The PDF, however is not being found there. Rather, I have ascertained that it (apparently) migrates to the so-called data folder in ...\Zotero\storage\[+a randomly assigned 8-character code]. There is, of course, no way that I could know and navigate to the one correct of hundreds of such folders. What would you suggest I do?

    In case it affects your recommendation, I would ideally like for all PDFs to reside on a cloud and/or on a designated computer (1 of 4), so I won't exceed my Zotero limit on its website. I am currently at the cap, and I'm sure it's because when I was trying to figure things out, I uploaded lots of PDFs--some quite large--that I ought not to have. If you could direct me to a mop to clean up that mess, I would appreciate that, too. I have plenty of cloud space, on Box, DropBox, and Google,

    Thank you so very much,
    kk
  • edited January 4, 2019
    Forget about "Locate" — that's only for use in pretty rare situations (e.g., renaming a file from the filesystem within its 'storage' subdirectory instead of through Zotero), and you should almost never navigate to a different directory using that.
    You can see the path/location of the to-be-attached pdf from within Zotero (desktop version) by looking at the link's path and filename.
    Not sure what you mean by that. The path for linked files isn't visible in Zotero. Do you mean from Zutilo?
    Rather, I have ascertained that it (apparently) migrates to the so-called data folder in ...\Zotero\storage\[+a randomly assigned 8-character code].
    Ascertained how? Note that both duplicates and files in different libraries are separate, so if you, say, copied a file to a group library, you'd still see a copy in 'storage' even if another copy of it was a linked file.

    If the file is in 'storage', the attachment would need to be a stored attachment, not a linked attachment, and you can see if that's the case based on its icon. The first thing to do would be to determine if you have stored files or linked files. Zotero itself never converts attachments between stored and linked files, though the ZotFile plugin can do that.

    If you provide a Debug ID for an attempt to open a specific file, we can tell you where it's looking.

    You can also use Zutilo to figure out what the path is in the database, and then make sure that files are at that location. If the path begins with 'attachments:', you'd need to make sure your base (not data) directory is set properly in the Advanced → Files and Folders pane of the Zotero preferences.
  • My Debug ID. Example of trying to access an attachment not found.

    D1043596168
  • That doesn't show an attempt to open a file. Try the instructions again.
  • If you don't mind, please let me know what the spin-off thread is, because I anticipate a similar problem when I move on to make my data Mac-accessible at home.
  • edited January 7, 2019
    It's here, but it's not really relevant. The way to ensure that linked files remain accessible when the location changes is 1) to make sure they're the accessible to start with — and we still need a proper Debug ID from you to diagnose that further — and 2) to set up a Linked Attachment Base Directory before the paths change, and then update the base directory afterward.
  • D1369729686 is my most recent debug ID. I generated it by double-clicking on an item (a parent?). Such items typically have attachments (children?) of either a direct and maned PDFfile, of a LINK to such a file. (Fairly often they have more than one child, including say a Note and/or a Snapshot. In the debug example there was only the parent entry with a single attachment which is a link to a PDF, not the PDF file itself. The double-click triggered the pop up box "File not found." I cancelled out of it and then tried clicking on the child item (a link) with the same result. I then stopped and sent the debug info. Next, using Zutilo, I checked the path of the attachment and saw that it was: /Users/[me]/Dropbox/PDF_Library/SquireP1993/Squire_1993_Profess...pdf. Two things are noteworthy about this.

    (1) usually when I check the path, Zutilo tells me it is either "attachments:[filename]" or "storage:[filename]. I cannot detect a pattern in which it is one or the other, but it seems to me that the items that elicit this path info are usually (always?) functioning properly.

    (2) That path given by Zutilo is not quite right: it should have "Desktop/" inserted between "[me]" and "Dropbox/". I thought I could fix this by using Zutilo's "modify attachment paths" so I put in the first path (up to but not including the file name), followed by the correct (inserted Desktop) path. My input in the two step process seemed to be accepted -- i.e., no error, and return back to normal status. However, the supposedly fixed item seems not to have been fixed. When double-clicking on either the parent or child, Zotera was completely unresponsive. I triple checked my path settings in Zotfile preferences and they are correct (although I can believe there may have been a time during my data entry when the "Desktop" was missing from the path - it's the kind of mistake I would plausibly make).

    If it has any bearing on current configuration/settings/fix, I would add that eventually, I want to be able to store the minimum amount of data on Zotero.org, yet have all - or as much as possible - files (including annotations) accessible to a PC in my workplace and a Mac at home. I have plenty of local disk space and am not keen to pay for yet another cloud account and I'm already at the cap. Given this problem on the horizon, it's not obvious to me how to standardize my data entry or how to update and make uniform my current entries. I'll try to be patient with that, however, and apologize if I'm pushing the tempo. Thank you for your assistance.

  • edited January 7, 2019
    I cancelled out of it and then tried clicking on the child item (a link) with the same result.
    Double-clicking the parent item just opens the priamry attachment. When there's only one attachment, there's no difference.
    usually when I check the path, Zutilo tells me it is either "attachments:[filename]" or "storage:[filename]. I cannot detect a pattern in which it is one or the other
    "attachments:[relative path]" is a linked file within your linked attachment base directory. "storage:[filename]" is a stored file in your data directory.
    That path given by Zutilo is not quite right: it should have "Desktop/" inserted between "[me]" and "Dropbox/".
    To be clear, that's certainly not the default Dropbox location — the default is in the home directory. So if you really mean that, you most likely had Dropbox stored in the default location previously and linked some files while it was there. So you need to correct those paths.

    You should be able to do that in Zutilo, but I can't help with that. I would think you could check the individual path to see what it's set to now.

    The way you'd fix it in Zotero would be by temporarily copying your base directory (which I assume is "PDF Library") back to the original location, setting the base directory to that location to pick up any orphaned files and convert them to relative paths, and then changing the base directory back to the original location. The files that were previously set to absolute paths to the old location should then work again.
    Given this problem on the horizon, it's not obvious to me how to standardize my data entry
    1) Set your linked attachment base directory correctly.
    2) Configure ZotFile to store files as linked files within the base directory.
    3) Set your linked attachment base directory correctly on all synced computers.

    That's it.
Sign In or Register to comment.