Preserving links to PDFs when moving to a new computer

Hello, I have hundreds of PDFs attached to items as "file links" in my Zotero desktop app. I keep the PDFs in a directory or folder on my computer's hard drive. I have read the documentation for migrating my library to a new computer and I understand I won't be exporting/importing my library since I want to avoid creating duplicate items.

But do I have this right: if I recreate the same directory structure for saving PDFs on my new computer, the file links in Zotero will still work on my new computer? So if PDFs on my old computer are in Macintosh HD /Users/rsulliva/Documents/zotero, can i recreate that same structure on the new computer, move all my PDFs into there, and count on my file links working in the desktop app? I hope this makes sense. I also plan to separately copy the Zotero data folder from my first computer to my new computer using directions here: https://www.zotero.org/support/kb/transferring_a_library
thank you all so much.
  • I use linked files for my PDFs on a linux system and, whilst I haven't actually ever done a migration between two systems, I can't see that you would have any problems with the procedure you describe.

    Actually, Zotero can be a bit more flexible than needing to re-create exactly the same directory hierarchy on the two systems. If you look at the Edit -> Preferences -> Advanced -> File and Folders tab, you will see that you can switch between using absolute and relative paths to specify the location of your linked attachments.

    What this means is that so long as the internal directory structure of your PDF store remains unchanged then that directory structure can be situated wherever you like beneath a path that you specify as the Base directory. It gives additional flexibility, which I found useful when moving my linked attachments around on the same system.

    The only proviso is that you should convert to relative paths before copying your Zotero data directory to the new machine if you do decide to physically store your PDFs in a different location on the new system; on the old system you would first of all specify the current path as the Base directory and then, once migrated to the new computer, you would change the Base directory to point to the different location on that system. (Equally it wouldn't hurt if you changed to using relative paths but then retained exactly the same location on the new system.)

    Caveat emptor but hope this helps.
  • thank you very much. Is the switch to relative low stakes, or is there potential for breaking some existing links? Is it like in HTML -- just two different ways of making a link to the same thing?
  • edited August 12, 2022
    Moving to relative paths was painless (took a little while) but was without incident; it's a mature part of Zotero.

    Yes, your PDFs will always physically be in a particular place in the file-system but the way you specify this can be done in one of two ways: 1/ where the complete (absolute) file-system paths are stored within the Zotero database; 2/ where partial (relative) paths are used and which are then anchored to the root of the file system by a prefix which is specified as the Base directory.

    The value of 2/ is the flexibility it provides in certain circumstances. This is explained further at https://zotero.org/support/preferences/advanced - cf. 'Linked Attachment Base Directory'.
Sign In or Register to comment.