Batch Modify zotero.sqlite to be able to find PDFs within a directory

I just migrated My Zotero Library from my PC to a new Mac using RDF. Previously, I had synced the citations, but they could not find the linked PDFs.

But the RDF method worked to an extent--the problem is however that the RDF rearranged my descriptive file directory names and isolated all 800 PDFs into separate folders with random names like RQ15L3U. I have copied the old file directory which was c:\Collected PDFs...\...etc. on the PC onto my Mac; but Zotero could not find the linked PDFs (I could see that the location given for them involved c:\Collected PDFs...etc. ).

My question: is it possible and fairly easy to modify the zotero.sqlite so that it could look and find files in the MAC directory system, which does not use c:\? (Instead, its directory is something like my.name\users\documents\Collected PDFs...).

Thanks,
  • First, it's important to understand the difference between linked files and imported files. Imported files are in Zotero's data directory, which uses the random folder names. So it didn't "rearrange" your folders—they're just no longer linked files. (And now, as I noted in your other thread, you could move the data directory back and forth between systems with no problem at all.) There are many forum threads on ways to use OS saved searches to view all PDFs (which have descriptive names themselves) within the Zotero data directory.

    Second, no, due to the way file paths are stored on OS X, you can't batch-change the paths in the database. (This would only work migrating between different Windows/Linux systems.) Eventually there'll probably be directory-relative linked file paths, but until then there's not much you can do to preserve your directory structure (short of writing a Zotero plugin in JS to batch-modify the paths).
  • Dan,

    This is very helpful. I did not know about the difference. Thanks.
Sign In or Register to comment.