Sync database in two systems using Zotero+Dropbox+Zotfile
(I read this thread https://forums.zotero.org/discussion/55466/zotfile-dropbox-zotero/#Item_0 but it is not what I'm looking for)
I have Zotero installed in my desktop PC and my Laptop. All my PDF attachments and the Zotero database are synced via Dropbox, which so far worked perfectly well.
A few days ago I decided to install the Zotfile extension to be able to store all PDFs in folders according to their year of publication (as opposed to what Zotero does which is keep each PDF in a single folder with a random name)
This worked alright in my desktop PC, I just had to rename all my stored articles so that Zotfile could move them to their new location stored in folders named as years.
The issue is that when I go to my laptop (after Dropbox synced all PDFs into their new location and the Zotero database), the Zotero client there won't find any of the attached PDFs. I've pointed both Zotero and Zotfile to the correct folder, to no avail.
I presume Zotfile (or Zotero) stored the full paths to each PDF taken from my desktop PC, and now it doesn't care that I indicate the correct folder where the PDFs are located.
Is there any way to get this right?
I have Zotero installed in my desktop PC and my Laptop. All my PDF attachments and the Zotero database are synced via Dropbox, which so far worked perfectly well.
A few days ago I decided to install the Zotfile extension to be able to store all PDFs in folders according to their year of publication (as opposed to what Zotero does which is keep each PDF in a single folder with a random name)
This worked alright in my desktop PC, I just had to rename all my stored articles so that Zotfile could move them to their new location stored in folders named as years.
The issue is that when I go to my laptop (after Dropbox synced all PDFs into their new location and the Zotero database), the Zotero client there won't find any of the attached PDFs. I've pointed both Zotero and Zotfile to the correct folder, to no avail.
I presume Zotfile (or Zotero) stored the full paths to each PDF taken from my desktop PC, and now it doesn't care that I indicate the correct folder where the PDFs are located.
Is there any way to get this right?
For your question, you need to set up a relative links base folder on both machines, pointing to the respective location of the Dropbox folder (or the Zotero folder within it -- doesn't matter).
I've been syncing my database with Dropbox for I'd say years now. I do this because that's how I keep my PDF attachments synced across my devices.
Since Zotero stores PDFs inside the 'storage' folder which is located in the same folder where the database is, that's the only way I could figure out how to do this. Are you saying I should be doing this differently?
Now that I'm using Zotfile, it allows me to set up a different folder to store my PDFs, so I guess the above is not an issue anymore. I'd still like to know what I'm doing wrong though.
What I've done now is move the database into the default 'User's profile folder' (the path is '/home/gabriel/.zotero/zotero/8ebn317b.default/zotero/', don't really know how this is selected) This picks up my database just fine, but not my PDFs. So then I set up the relative links base folder where my PDFs are stored, but the PDFs are still not being found.
I uploaded an image (in Spanish, sorry) so you can see how I've set things up: http://postimg.org/image/o16fj5j07/
Any idea on how I should fix this?
The settings as you have them now are fine. You do need them set up on all computers, though, not just on one.
Is there any way to fix this automatically? Shouldn't the relative path for the base folder already take care of linking the PDFs properly?
Finding the paths to each PDF one by one is not reasonable, since I have +800 PDFs.
https://addons.mozilla.org/en-US/firefox/addon/zutilo-utility-for-zotero/
How can I fix this for my entire database? The Zutilo add-on has an option to modify the path to an attachment, but I'm not sure how to use it.
I'm also scared to do something that will mess up my ~900 entries.
/Zotero/almacenamiento/Zot//2016/name_of_attach.pdf
(notice the double backlash, not sure why that happened?) That's the old path I use to have.
The path to the base folder I've set up is:
/media/rest/Dropbox/apps_sync/Zot
so I want it to look here:
/Zot/2016/name_of_attach.pdf
All my attachments currently have paths that look like:
/Zotero/almacenamiento/Zot//YEAR/name_of_attach.pdf
and should be changed to :
/Zot/YEAR/name_of_attach.pdf
Try for one item (!) with Zutilo
Modify attachment path
and insert in the first window
/Zotero/almacenamiento/Zot/
press OK
and insert in the second window
/media/rest/Dropbox/apps_sync/Zot
See if that works.
What happened is what I keep getting all morning, I explain below.
Currently any old entry is shown by Zutilo with a path that looks like:
attachments:../Zotero/almacenamiento/Zot//2015/name_of_attach.pdf
I've tried adding a new entry to my database to see what the correct path is. Zutilo's feature "Show attachment path" for this new (properly stored entry) tells me it is:
attachments:2016/name_of_attach.pdf
(notice there are no double dots)
Any modification I try on old entries (including your suggested one) results in a new path that looks like:
attachments:..2016/name_of_attach.pdf
So there's an issue here with the '..' that keeps being added to the path. Could the double backlash be at fault here?
This means that what I put in the first window, i.e.: the old path that should be replaced, is not correct.
I've tried all modifications of the path:
../Zotero/almacenamiento/Zot//
that I could think of. None so far worked.
* ../Zotero/almacenamiento/Zot//
* ../Zotero/almacenamiento/Zot/
* /Zotero/almacenamiento/Zot//
* /Zotero/almacenamiento/Zot/
* /Zotero/almacenamiento/Zot
* Zotero/almacenamiento/Zot
None of these produce any change in the (incorrect) stored path, which sows as:
attachments:..2016/name_of_attach.pdf
while the correct one seems to be (according to a newly added entry):
attachments:2016/name_of_attach.pdf
I changed in Zotfile's preferences the 'Use subfolder defined by' from
/%y
to
%y
and now changing with Zutilo the paths from:
../Zotero/almacenamiento/Zot//
to nothing (ie: blank) works.
Thank you very much for your patience Adam!
I am using Zotero (4.0.28.7) across two devices (PC and Mac). I have Zotero standalone on both and the base directory syncing via Zotero storage while I use Zotfile to sync attachments in Dropbox.
I can rename files on each device and thus move them to the dropbox folder I created. However, every time I attempt to access a file saved by the other device I get the notification "The attached file could not be found".
The Zotfile settings are:
PC: Users\<name1>\Dropbox\Zotero\Zotfile
Mac: Users\<name2>\Dropbox\Zotero\Zotfile
Name1 and name2 differ due to company policy. As far as I can see, the reason is that Zotero, on each device, searches for the file in the 'normal' Zotero storage folder in the data directory (on PC: ...\Profiles\<random string>\zotero\storage). Meanwhile, I do not know how to change the settings.
Thank you for your help!
In Zotero, do you use a relative file base directory (that's a Zotero preference under advanced --> Files and Folder). Should be
PC: Users\<name1>\Dropbox\Zotero
Mac: Users\<name2>\Dropbox\Zotero
respectively
Thank you for for your help! It works now; I had Users\<name>\Dropbox\Zotero\Zotfile in the relative file base directory.
As to why I thought Zotero would be looking in the storage directory: When I clicked 'locate' in the error notice, it took me directly there.