Move linked files

Hello,

I'm using zotfile to move pdf to a single folder. So I end up with all my pdf in a folder and linked file on zotero item.

I need to move this folder to an other place. I try but Zotero don't find the linked file anymore even if I change the directory.

On Zotero:
- I was NOT using a base directory so my paths are certainly absolute path. Don't know if it make a difference if you use zotfile anyway.
- I'm using the profile directory for data.

On zotfile:
- I'm using custom directory for the "Location of files". This is this directory I want to change.


I know I can use the locate but can I modify the path of linked files in batch?

Thanks for your help
  • Zotero can't do that, but Zutilo can:
    https://addons.mozilla.org/en-US/firefox/addon/zutilo-utility-for-zotero/
  • Thanks a lot adamsmith I was able to change all paths with Zutilo.
  • edited July 7, 2016
    Just to add, though, Zotero can do this — this is pretty much the point of the base-directory feature. You don't need to have had a base directory set when you added the items — if you set it to that directory now, Zotero would modify those absolute paths to be relative to that directory, and then you could move that directory anywhere and simply update the base-directory setting (and even revert to absolute paths afterward if you wanted).
  • edited July 7, 2016
    Are you sure? Because I think I tried that.

    But yeah perhaps I missed somethings, Zotero's folders settings is so confusing :/.
  • Are you sure?
    Yes.
  • :) I will try next time i need it. But all this made me wonder the usefulness of giving the choice to "absolute path". I really prefer how http://calibre-ebook.com is managing is library in a single folder.
  • I'm not sure I understand (and am not familiar with how Calibre works). Zotero stores files in its own data directory by default, which avoids any complexity with paths.
  • Just to explain how to confirm this behavior:

    1) Create two directories, A and B.

    2) Drag a file into A.

    3) Add the file in A to Zotero as a linked file. The file will be stored with an absolute path. If you move it, the link will break. (You can test that, as long as you don't have Zotero set to download synced files as needed.)

    4) In the prefs, set A as the base directory. The file will now be stored as a relative path — in this case with just the filename, because it's at the root of the base directory.

    5) Drag the file to B. The link will now be broken, because A/file.pdf doesn't exist.

    6) Back in the prefs, set B as the base directory. The link will now work again, because B/file.pdf exists.

    7) If you change the base directory again or disable it, the link will revert to an absolute path to the file within B.
  • Yeah this works.

    But I think it's easier to understand if your can only choose where is your "library" folder. The "library" folder contain item's file (pdfs or HTML pages) and the MySQLlight file. The preferences can stay in the profile folder in some hidden place. It's what Calibre and iTune do for example.

    I know you can do somethings similar with Zotero but it's not straightforward.

    Why not keep simply files in the profile folder? Because you want to access those files (pdf) with other programs. And profile folder can be a mess. It's also less "magic" if you can see where the files endup.

    Then when you add a file you can simply ask the user "add this files to my library or link it." with "add / link" and a checkbox "always do that".
  • But I think it's easier to understand if your can only choose where is your "library" folder.
    That's possible (it's the field right below the relative links), but it's not the only thing people wanted, which is why Zotero added the relative link option. That's why all of this is under "Advanced" -- if you want it simple, just leave the advanced prefs alone entirely.
  • ok, we mostly agree. I just don't think the default settings are the best.
  • Again, though, with the default settings Zotero manages your files for you entirely within its data directory, including syncing them to other computers for you. It's pretty hard to argue that that's not the simplest option.
  • "within its data directory", it's exactly the reason why iPhoto sucks. You can't access photos without iPhoto. But Zotero5 is a lot better in this regards, now at least the Zotero directory is in ~ with all the files inside ~/Zotero/storage.
Sign In or Register to comment.