Zotfile preferences - dynamic custom location

Is it possible to change the custom location in Zotero for different collections? If one day I am going to work with Coll.1 and I put the custom location in one path. The next week I need to move to other folder and a different path. Is there any trouble doing this if I edit the files in Zotero or sync to Notero (Notion)
  • I think changing the custom location and running rename again will work, but this sounds like a disaster waiting to happen. That's the perfect use case for Zotero groups
  • There are linked file setups that have linked attachment files in different subfolders, usually all under a single parent folder. That doesn't require any dynamic changes to settings. But I don't use such a setup so I'm not the person to advise on it. Most Zotfile users have all their linked files in a single folder.

    I would caution against making any linked file setup too complex. There are good reasons why Zotero devs suggest that you use Zotero's standard storage under Zotero\storage rather than linked files. But *basic* linked file setups do usually just 'work'. More complex setups are prone to break (eg in the transition from Zotero v6 to v7, when new plugins will replace Zotfile, and may not support more complex setups in exactly the same way as Zotfile can under v6). If you still really want a complex setup, you need to have a complete understanding of how your setup works 'under the hood'.

    Zotfile's Custom Location determines where linked attachment files get *stored* by Zotfile/Zotero. Zotfile will store linked files to whatever Custom Location is in place at the the time the storage occurs. Zotero then needs to know where to find that file when you try to open it. So the location to which a linked file is stored is baked into the Zotero sqlite database as a full explicit path at the same time (eg G:\Zotero attachments\filename.pdf) ... *unless* you have a Linked Attachment Base Directory set in Zotero settings.

    If set, Zotero's Linked Attachment Base Directory setting determines where Zotero *looks* for linked files when you try to open them. A LABD setting is only really required if that location is different on each computer you work on (linked files do not work on mobile devices, in the web library, nor with Groups). If you only work on one computer, or linked files are at exactly the same location on all your computers, you don't actually need a LABD setting (but there is no problem in a standard linked file setup if you have one anyway).

    As I said, if *no* LABD setting is in place, the location to which a linked file is stored is baked into the Zotero sqlite database as a full explicit path. On the other hand, if a LABD setting *is* in place (eg G:\Zotero attachments) OR is put in place *after* linked file locations were saved to the database without it (ie as explicit paths), all explicit paths in the database are replaced by Zotero with the prefix 'attachments:' (eg attachments:filename.pdf). That tells Zotero to use the current LABD setting when you try to open that file, so that it can still find the file at G:\Zotero attachments\filename.pdf.

    If you ever need to revert a linked file setup back to standard storage under Zotero\storage, you can use Tools\Manage Attachments\Convert Linked Files to Stored files. But that relies on Zotero being able to find the linked attachment files at the path it thinks you stored them at (ie explicit path or under LABD).
  • As you said, I use different computers, BUT all my references are saved in one specific cloud, that belongs to one computer. As mentioned before, groups may be an alternative, as I have read before, I don't see how it could be helpful for me having an hierarchical structure folder1>subfolder1>subsubfolder1 or folder1>subfolder2>subsubfolder1... How would it be?
    It's just one unique folder storage is almost impossible. But the multiple setup possibly yields errors in the future... It has to be a common problem, I guess there has to be a simple approach.
  • I was re-reading your post, I don't fully understand which is the difference in Zotfile preferences between source folder and Custom Location. I don't really like the configuration of just one folder, seems like once you rename and move and link the pdf file to your Drive location, and move on to a different folder changing the zotfile preferences, the pdf file doesn't find the file anymore. Why is this happening, shouldn't be the link attached to the folder and ends there?
    https://s3.amazonaws.com/zotero.org/images/forums/u13463943/137kc63n4bgfsrs7v7nt.png



    They told me to move from Mendeley to Zotero, and I'm regretting it
  • The source folder is irrelevant for file storage (as the name "source" suggests, it's a folder that ZotFile lets you monitor for attaching new files to existing items).
    Depending on your set-up, you may need to adjust the linked attachment base folder in the Zotero (not ZotFile) preferences on different computers.

    For the error message -- Zotero shows you the file path it's looking at. Is the file there or not?

    (As for groups -- the suggestion there was to work with Zotero File Storage, which has the advantage of just working without any setup; you can't use groups with linked files at all).
  • For the error message -- Zotero shows you the file path it's looking at. Is the file there or not?
    There is not. I establish the link file, and then move to another Custom location

    Depending on your set-up, you may need to adjust the linked attachment base folder in the Zotero (not ZotFile) preferences on different computers. I don't understand, why? As I posted in the other thread, my plan is to establish the following setting in order to work with 3 computers, seems correct?

    Zotero preferences

    Base directory: G:\Otros ordenadores\PC1\IMIM\Bibliografía\Zotero PDFs.
    Data directory location: Default (different for each computer)

    Zotfile preferences:

    Source folder for attaching new files: G:\Otros ordenadores\PC1\IMIM\Bibliografía\Zotero PDFs.
    Custom location: G:\Otros ordenadores\PC1\IMIM\Bibliografía\Zotero PDFs.



    The thing for me is 300 MB is nothing
  • Zotero looks for the linked file in a folder that doesn't include Zotero PDFs -- that shouldn't be possible with the way you describe your set-up (unless you created it previously)
  • So which parameter should I change?
  • I don't know -- it's unclear to me how you created and then broke the file link in the first place. I'm not sure if it's going to be possible to work with multiple different custom locations _and_ different base directories. You can try setting the base directory to a higher level folder (e.g. G:\Otros ordenadores\PC1\IMIM\ ) but it really depends on what is actually going on.
  • Let's forget about the multiple different custom locations. Just working with one single folder, because I tried before the higher level, but didn't work out. I don't know if it was because of the setup or an unknow reason

    So my plan is single folder as specified before, and with the PDFs dragged from now start from the bottom
  • The settings above are fine for that. Do note that ZotFile does not automatically move files after you've dragged them to Zotero (which isn't typically the recommended way to add to Zotero). You have to manually use Manage Attachments --> Rename attached files to move them (though you can do that in bulk).
  • edited March 24, 2024
    In @JavierHerRe 's other thread, using the modifier key* when dragging PDFs from an existing folder - when you want to keep them stored in that folder - was mentioned as a way to create Zotero items with links to those PDFs in that folder. That would seem to be the best way for people who come to Zotero with a large existing folder of PDFs stored on their computer, who want to keep them in that folder as linked PDF attachments in Zotero (noting the restrictions of linked files).
    https://forums.zotero.org/discussion/comment/458847/#Comment_458847
    https://www.zotero.org/support/attaching_files#linked_files

    *hold down Ctrl+Shift (Windows/Linux) or Cmd+Option (Mac) while drag/dropping PDFs from your OS into Zotero.
  • Ok, you do that, you'll need to make sure that the file location matches with the other settings
  • But this is as far as I understood is a partial solution. You need to keep changing the base directory every time you sync new files coming from different existing folders, and link (in my case from a cloud, Google Drive), isn't it?
    Is not that you can drag files and they are stored in Zotero and linked to the GDrive folder without any further requirement?
    Just for clarifiying
    Appreciate the effort
  • As long as the file paths converge at some point (so you have G/something/anotherthing/Zotero/1234 on one computer and G/sthelse/anotherelse/Zotero/1234 on the second computer), setting the link to the lowest common base (i.e. Zotero here) will work as long as all linked files are, in fact, within the common base (Zotero). Relative links are for exactly that, but you do need to spend the time to conceptually understand (and maybe test) how they work.
Sign In or Register to comment.