Change path of all "link to file..." citations in library
Hi all,
I have a library that I built around links to files in a Bibliography/ folder on a Linux system. I had to migrate that machine to Windows, and now that folder cannot have the same path as before as the paths' structure has obviously changed.
Is there a way I can automatically relink all entries to the new path? Any batch-editing tools won't do as the link's paths are obviously all different. Ideally, I would need low-level access to Zotero's database and change all entries with a wildcard set on the original path. I don't mind doing it with SQL or any programming language, but I could do with a tip on how to do it without reading much of Zotero's developer docs!
Is it possible to do it within Zotero? If not, can a good soul point me to Zotero's guts on my machine (a SQLite file, a MySQL instance, whatever it is in practice) so I can do my dirty fix? Thanks so much,
Andrea
I have a library that I built around links to files in a Bibliography/ folder on a Linux system. I had to migrate that machine to Windows, and now that folder cannot have the same path as before as the paths' structure has obviously changed.
Is there a way I can automatically relink all entries to the new path? Any batch-editing tools won't do as the link's paths are obviously all different. Ideally, I would need low-level access to Zotero's database and change all entries with a wildcard set on the original path. I don't mind doing it with SQL or any programming language, but I could do with a tip on how to do it without reading much of Zotero's developer docs!
Is it possible to do it within Zotero? If not, can a good soul point me to Zotero's guts on my machine (a SQLite file, a MySQL instance, whatever it is in practice) so I can do my dirty fix? Thanks so much,
Andrea
Thanks very much for the link. That's definitely the way to go for the future (and in retrospective, what I should have used from the start), but that won't change the existing absolute paths.
I found the SQLite file where the Zotero libraries are likely stored... is that my only option? Thanks,
Andrea
Do not edit the database directly. All changes have to be made through the application.
Let me know if there's any way I can help if this is supposed to be a feature, e.g. by flagging this as a bug.
Did you actually set the linked attachment base directory to a containing folder of the current location of the files?
Can you provide a Debug ID for attempting to open a missing file?
6.0.19 just downloaded and installed yesterday.
> Did you actually set the linked attachment base directory to a containing folder of the current location of the files?
All my files are supposed to be at the top level of my Link Attachment Base Directory. Every time I relink a file manually, the output is a relative path to that LABD, as expected. So, if before I had /home/$me$/path/to/Bibliography/mypaper.pdf, after relinking to C:\Users\$me$\path\to\Bibliography\mypaper.pdf, the new path in Zotero appears as "mypaper.pdf".
> Can you provide a Debug ID for attempting to open a missing file?
Here it is: D161233840
Thank you!
We can probably fix this later today in the beta.
If you don't want to wait, you can use the third-party Zutilo plugin to batch-change the paths.
Ironically, I have the same problem with the Python libraries I wrote for my research, which now kick and moan due to changes in the path and file handling (you would think that using os.path.join() would make your code cross platform? I thought so too! :D)
In short, I can wait. There's all that to fix first.
Many many thanks!!!