My PDFs were replaced by HTML files
Report ID: 223668007
I have a library of hundreds of pdfs. However, now when I try to open a pdf in Zotero I get the following message:
"The attached file could not be found.
It may have been moved or deleted outside of Zotero, or, if the file was added on another computer, it may not yet have been synced to or from zotero.org."
I have not used zotero with another computer, nor have I synced it online or used it online. I have stored all my files locally on my hard drive at C:\Users\User\Zotero. The data directory location is set to the default location, which is this location. When I go there, I do have a storage folder that is about 600mbs. When I search in that folder using key words from my pdfs I do find folders with documents in them. However, what I find are not the pdfs that I originally had. They seem to have been replaced by html files with all the accompanying jpgs, svgs, etc. When I open the html file, it takes me to the website where my pdf came from. However, my pdf is simply gone. I don't want the html files. I want my pdfs back. They had tons of notes and highlights. That was two years of my PhD work, so it is really important that this gets fixed.
I have a library of hundreds of pdfs. However, now when I try to open a pdf in Zotero I get the following message:
"The attached file could not be found.
It may have been moved or deleted outside of Zotero, or, if the file was added on another computer, it may not yet have been synced to or from zotero.org."
I have not used zotero with another computer, nor have I synced it online or used it online. I have stored all my files locally on my hard drive at C:\Users\User\Zotero. The data directory location is set to the default location, which is this location. When I go there, I do have a storage folder that is about 600mbs. When I search in that folder using key words from my pdfs I do find folders with documents in them. However, what I find are not the pdfs that I originally had. They seem to have been replaced by html files with all the accompanying jpgs, svgs, etc. When I open the html file, it takes me to the website where my pdf came from. However, my pdf is simply gone. I don't want the html files. I want my pdfs back. They had tons of notes and highlights. That was two years of my PhD work, so it is really important that this gets fixed.
Have you used zotfile or other extensions to change your pdf directory?
Might some program (such as whatever you're using to markup the pdfs) done something with the pdfs?
Zotero certainly did not delete the files on disk — it literally has no code to do so without also deleting the attachment — so either the files still exist somewhere or something else deleted them.
Are the PDFs you're trying to open stored files or linked file? For the latter, you would see a small chain in the attachment icon. You've posted about ZotFile before, suggesting you were actually using linked files, in which case your PDFs wouldn't have been within the data directory and you might simply have moved the directory where they're stored. To fix that, you'd want to move them back to where Zotero is looking, set up a Linked Attachment Base Directory in the Advanced → Files and Folders pane of the Zotero preferences, move the directory, and then update the base directory.
Can you provide a Debug ID (different from a Report ID) for an attempt to open a file that's missing?
Above, dstillman says, "move them back to where Zotero is looking, set up a Linked Attachment Base Directory in the Advanced → Files and Folders pane of the Zotero preferences, move the directory, and then update the base directory."
I think I will need more details for this to work. First I don't know how to find the location of the files (I don't know where Zotfile put them and can't find it with Zotfile disabled). Then, do I move the individual files or all at once? How do I know where Zotero is looking beyond the generic "storage" folder? Etc. Etc.
I appreciate help with this. It will also likely help others that were using Zotfile and now can no longer access their files.
https://github.com/willsALMANJ/Zutilo
I'm not sure how to do either of those things. Any further detail would be appreciated!
You can xxx out your username in these filepaths if you prefer.
In Preferences > Files and Folders, both "Linked Attachment Base Directory" and "Data Directory Location" point to C:\Users\User\Zotero. So, most pdfs are in one location (C:\Users\User\Documents\xxxxxxxx\Pro\xxxxxxxx\Research\ZOT\) and the other things are in another location (C:\Users\User\Zotero\storage\).
So, now I need to know how to relink the files or move the files to the correct location. I have looked at forum discussions such as "Batching editing selected file links with Zutilo", but I still don't feel confident doing it. The directions I have seen so far are not clear. Is there clear documentation somewhere that will help to do this? I'm sure that I am not the only one who was using Zotfile and will need to do this now that Zotfile is not longer supported.
1) ZotFile still works and is supported, not sure why you think that's not the case
2) You should absolutely not have the base directory set to the same location as the data directory.
The first thing I'd try is to set the relative base directory to
C:\Users\User\Documents\xxxxxxxx\Pro\xxxxxxxx\Research\ZOT
and see if that's enough to get your PDFs opening again.
Under Zotero > Edit > Preferences > Files and Folders, under Linked Attachment Base Directory, I changed the Base Directory to the path you suggested above. It is still not finding the files.
I have, however, when going through that figured out the issue that was keeping me from opening the files. I had changed one of the folder names in the path where ZotFile had stored the files. So, the old path no longer existed. I changed the folder name back to what it previously was and now it works.
So, this brings me to one final question (hopefully). Thank you for your patience thus far! I do need to change the folder name where my files are located so that I can run programs that don't like spaces in path names. To do so and have my files still attached, can I do this:
1. Rename the folder.
2. Change the path in ZotFile preferences under "Location of files" to have the new folder name in it.
3. Select all files in Zotero > right click > manage attachments > rename attachments.
You can then also update ZotFile settings so it moves files to the right place, but that's totally unrelated to your existing files.
If I right click on items > Zutilo > Show Attachment Paths, I can see that the path is still pointing to the old path with the old folder name. I'm guessing this is because I used ZotFile to store the files in the custom location. Perhaps these are not relative paths but are absolute? Or perhaps, there is something I am missing?
If you're able to temporarily move the folder back to the previous location, you can set the base directory back to that directory to collect those files as relative paths, and then you can move the folder to the new location and update the setting again.