Zotfile - How to "relink" attached PDFs with Zotero files?

Hi there,

my problem might be trivial - but I´m seriously struggling, so I really hope for helpfull thoughts!

I`ve been using Zotero and Zotfile to sync the pdf-attachments of my Zotero files on my OneDrive folder - everything worked out quite well!! (Thanks to the team for the great work, the helpfull plugin and the good online explanations!!)

Last week my laptop broke down. When setting up the "new" one (its actually an old left over one from the office), I reinstalled Zotero and Zotfile and synchronized everything to my online storage. This worked out - I got all my files with the attached links. But apparently all the saved links to the attached pdf are now incorrect... (Maybe because my microsoft user name is now different?! Ore the OneDrive file structure changed?) Thus, I´m getting the message "Attached file could not be found. It may have been moved or deleted." So, I still have the Onedrive folder with all the saved attachments but am now struggling to reconnect them to their original Zotero items. I hope I could make it clear...
Does anyone have an idea how to solve this?

Thanks everyone for reading! Any helpfull idea is greatly appreciated!
  • You can fix the paths in batch with the Zutilo plugin.

    The way to avoid it going forward is to make sure you've set the Linked Attachment Base Directory in the Advanced → Files and Folders pane of the Zotero preferences. That will cause Zotero to store all linked file paths relative to the path you set, so that if you, say, move to another computer where the path is different, you simply need to update that setting and the relative paths will still work.
  • Thanks for your reply!!
    And the relative file path setting it was!
    Apparently I had to update this setting, cause the OneDrive path somehow changed... Everything is fine again! Thank you so much!
  • Just found this. Thank you.

    Zutilo is amazing!
  • "You can fix the paths in batch with the Zutilo plugin."
    How do I do it, step by step?
  • @OronzoAdrianoCelentano You should not expect the Zotero developers to give step by step instructions for third-party plugins. You could read about Zutilo's "Modify attachment paths" function here:
  • @qqbb, there are hundreds of posts of you guys talking about ZotFile and Zutilo before my question came in. If you do not want to help this time for some reasons it is fine, but do not tell me that I should not be asking the question because similar questions have been asked millions of times.
  • @OronzoAdrianoCelentano: To clarify, qqbb's point wasn't that you shouldn't ask questions — it was that you shouldn't @ me. It's not a big deal, but I'm a Zotero developer and not the one to answer questions on third-party plugins. It's also just considered impolite to @ specific people for general questions. Just ask your question, and people who are qualified to answer and who want to answer will do so or provide a link, as qqbb did.
  • edited January 28, 2020
    Thank you for the clarification. This is my point of view, though, which anyone is free to criticize: his link is useless because I still do not understand how to solve my problem, because the information from that link is like Chinese to me. Thanks for the link, though.
  • edited January 28, 2020
    That's understandable, but I don't think it can really be much more explicit and step-by-step than it is. I'd suggest asking someone tech-savvy to help you in person — they should be able to do so fairly easily from that link based on your specific situation.

    You haven't actually said what the problem you're experiencing is, though. Under normal usage, you can do most things with just Zotero itself, including move folders containing linked files without breaking the links. So it may be helpful to start a new discussion and explain exactly what you're trying to do.
  • @OronzoAdrianoCelentano My comment was not meant to be offensive, sorry if it seemed so. I'm a Zotero user just like you. Occasionally, I try to help. Your questions can be helpful for others as well, I'm sure many users will face similar problems. Zotero and its plugins are great software, but many functions are indeed quite involved and often it's not obvious how to do something. Luckily, this forum is a great resource. I hope you'll get the help you need.

    Regarding Zutilo, did the installation work for you? Zutilo can add further options to the context menu of an item, which is accessed by right-clicking. You need to make them visible through "Tools" -> "Zutilo Preferences..." -> "User Interface", e.g. by selecting "Zutilo context menu". (Selecting "Zotero context menu" just changes the level in the item context menu, which could be useful for frequently used functions.) For the purposes here, select "Show attachments" and "Modify attachments", which add the "Show attachment paths" and "Modify attachment paths" functions to the context menu.

    The "Modify attachment paths" function can change the file links (pointers) in Zotero's database. Note that it will not move the actual files from one path to another. The function prompts for the old and new partial paths. In order to figure out the paths of broken or working links, you can use the "Show attachment paths" function. This could show you an absolute path of a linked file ("C:/userData/references/coolPaper.pdf"), a relative path of a linked file in the Linked Attachment Base Directory ("attachments:references/coolPaper.pdf"), or a path to a file in Zotero's storage ("storage:coolPaper.pdf").

    I would like to encourage you to describe in detail what your problem is. For properly fixing it, without creating possible additional issues from failed attempts (remember to create backups), it would help to know how the problem occured (e.g. from changing a computer or moving a folder) and what the old and new file paths look like (e.g., whether you're using relative or absolute paths). The more details you can provide, the easier it will be for others to help. As dstillman suggested, it might be useful to open a new thread, providing as much information as possible.
  • @qqbb Thank you so much for your detailed instructions! I've spent quite some time to figure out how to update all of the broken paths to linked files in Zotero (I kept relocating for about 20 files along the way as I read but gave up later). Luckily for me to stumble upon your comment.
Sign In or Register to comment.