How to update/fix/see file link paths
I have a (Windows) user who was storing her library of PDF articles on a network share and adding links to the files in Zotero entries. Recently, the network storage changed and she ended up changing drive letters. Zotero couldn't find the links.
We tried some things, and I think we have the original drive letter back (the user isn't sure). Zotero still can't find the files though. Maybe we made changes that messed it up, but the root of the problem is we don't know where Zotero is even looking.
If a user links a file to a reference and manually selects the file, where is that path stored? Can we see that path? Can we update it? I don't think this user was using relative paths because that is not the default and because the PDFs are all in user-named subfolders. I'm sure the home directory is/was the default too (so, not on a share).
Is this user now stuck going through hundreds (thousands?) of references and manually finding and linking to the articles she has saved? Because of a drive letter change?
Thanks for any input you may have.
We tried some things, and I think we have the original drive letter back (the user isn't sure). Zotero still can't find the files though. Maybe we made changes that messed it up, but the root of the problem is we don't know where Zotero is even looking.
If a user links a file to a reference and manually selects the file, where is that path stored? Can we see that path? Can we update it? I don't think this user was using relative paths because that is not the default and because the PDFs are all in user-named subfolders. I'm sure the home directory is/was the default too (so, not on a share).
Is this user now stuck going through hundreds (thousands?) of references and manually finding and linking to the articles she has saved? Because of a drive letter change?
Thanks for any input you may have.
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
The Zutilo extension can help you batch-change file paths. But if you can temporarily restore the old location, the better thing to do is to set the attachment base directory to the root of the drive (or the user's own subdirectory), move it back to its new location, and then update the base directory to point to the new location — then all the files below it will remain accessible.
E.g. if your files were located in C:\old_location\dir\a\file1.pdf and C:\old_location\dir\b\file2.pdf and now you are storing them in E:\new_place\something\a\file1.pdf and E:\new_place\something\b\file2.pdf
Then, recreate C:\old_location\dir, point Zotero's _base_ directory to C:\old_location\dir, and then change it to E:\new_place\something
You can delete C:\old_location\dir after this.
Part of the problem is I don't know exactly where Zotero thinks the files were before. It seems to me that if the reference/record can have an attribute for the path to attachment(s), that should be viewable in the record.
All that changed was the server. The share and all the folder paths are the same. The user isn't sure what drive letter they were using. When the server changed, they remapped to "Z:". They may have made other changes -- I kinda' doubt it, but I don't know. Zotero couldn't find the files. I came and tried adjusting the base directory and adjusting the relative path. Neither of those worked. I un/re mapped the share to "R:" (which is most likely where it was) and Zotero still isn't finding the files. If the path was on R:, then that would have done just what Aurimas suggested.
Of course, we can browse and link all the files, but that is a nightmarish proposition. I guess there is one important question yet to be asked/answered: Is there something a simple user could have done that would have caused all records/references to remain intact, but yet have lost the entire path to links so we have no chance of discovering/tweaking that path to the correct one?
Thanks.
As for your question: no, there is no way regular usage of Zotero will change anything about the content of a link.
edit: If you really don't want to install Zutilo, you can run this through debug as suggested by Dan, but since it doesn't even require restart, doing this with Zutilo seems a lot easier.
The next question is how to modify all the paths to be relative to a defined path in the Zotero settings. Zutilo has a modify path option, that can be applied to a selected set of references, but it is not clear what will be replaced. In other words, if two files are linked to:
Y:\references\topic 1\paper A\file X.pdf
Y:\references\topic 2\paper B\file Y.pdf
How do we mass remove only the "Y:\references" part so that we can change the root location to "R:\Jane\refs" and make the paths relative from there? If we put "R:\Jane\refs" into Zotero (or Zutilo), how does it know if the final paths should be:
R:\Jane\refs\references\topic 1\paper A\file X.pdf
or
R:\Jane\refs\topic 1\paper A\file X.pdf
or
R:\Jane\refs\File X.pdf
or even the nonsensical:
R:\Jane\refs\Y:\references\topic 1\paper A\file X.pdf
??
I apologize for my ignorance.
It was totally not clear in the interface that there would be a second prompt after the first or even that the first prompt was for the part of the path that would be replaced.
Thanks.
"Old partial path to attachments' directory to be replaced:"
I thought that was pretty clear?
In hindsight, it makes sense, but without knowing there would be a second input though I was nervous about messing up the user's setup (more than it already was).
I would prefer both the inputs in one window or the button for the first to be clearly a "Continue..." or "Next" to indicate there is more to do before the actual change occurs.
Thanks again.