Link to directory for reference

I'm new to Zotero, so please let me know if I'm missing an existing answer. (I've done a bit of searching, but didn't see anything that answered this.)

I want a very simple but important feature:
When I link to a reference, I would like the option to link to a directory/folder rather than a file. Sometimes I have a PDF, and other times I have a folder. The reason is obvious: I have multiple files inside that folder (perhaps multiple PDFs, several scanned image files, extra notes for the item, or even multiple copies of the same item).

If I can't link to a directory, then I will be unable to use Zotero to manage my files. I can still use it as an external database, but obviously that significantly limits the functionality.

In short, all I want is this:
1. Save metadata in Zotero.
2. Add a link to a file OR directory where I have that reference.
3. Click on that entry to open that file or directory.


Notes:
--I'm on a Mac, using Firefox.
--I don't care about any "sync" features. Stand-alone is better. (Many of my files are hundreds of megabytes-- eg, old books from archive.org, so backing that up would be a waste of space.)
--I'm looking for a convenient bibliography+organization tool to go on top of my existing directory structure (just a folder with many Author2013-format entries, either files or directories).

Thanks!
  • You can't link to a folder, but you can add links to multiple files (e.g., all files in a folder) at once by Cmd-Option-dragging the files to an item in Zotero. (On Windows/Linux, it's Ctrl-Shift-drag.) The files will all be underneath the item as linked file attachments.
  • Hi Dan,

    Thanks.

    Unfortunately, that doesn't work for me. There's a reason I have a folder-- it's a place to put any and all relevant files, not just because I have a set list of files to associate.

    Example Reasons:
    1. I sometimes have JPEG files (scans) that are not compiled into a PDF. There might be hundreds of these (eg, a book). I could compile them, but I often do not due to time (and the fact that I always can in the future if I want). Associating dozens or hundreds of files would be silly.

    2. The folder will remain constant, while the files in it might change. Examples:
    --I might add a new file, which should be associated with the same reference.
    --I might have a placeholder (eg, a website that mentions an article, while waiting to get a copy of the full article).

    3. When I click on the reference, I want the folder to open, not any of the files. I want to be directed quickly to the place where I can then decide which of the files I want to open. (Using folders allows me to do this, and I'm happy with the setup.)
  • We might be able to add support for linking to folders in the future, but in the meantime, the best I can suggest would be to add a single file from the folder and right-click -> Show File to open the folder. (This will work on the parent item as well.) Only slightly slower than double-clicking.
  • That could sort of work, but then I would need to somehow guess which references are folders and which are files, so that I would know when to double-click and when to right-click>'Show File'.

    Is there a reason this would be especially hard to implement? I can imagine how complicated it could become in terms of using the 'sync' option or managing all of the contents of those folders, not to mention how much space it might take. But simply to allow a link to a folder doesn't seem especially difficult.

    Is your reasoning that users would find a link-only option too limited, and that they would then require additional options like 'sync' and copy folder?

    In the meantime, I don't see the downside in allowing a folder link, though.



    Again, thanks for your reply. But if I can't have this feature, then I can't use Zotero to manage files. It still seems useful as a database (until now I've been using something I wrote myself, just a basic list-and-tag database system), but I was hoping for something a little more centralized, rather than a set of files (and folders), in addition to a database of what they contain.
  • Is there a reason this would be especially hard to implement?
    Not more so than the hundreds of other features people have requested over the years. It's just not currently implemented, is pretty much the answer, and this isn't a common request.

    Specifically, though, since you asked, in addition to the basic change to the filepicker, this could easily require changes in various places in the code where links are assumed to be files, we'd need to figure out a content type to assign in the database so that Zotero knew these were folders, we'd need to display a folder icon in the middle pane, we'd need to prevent attempts at indexing the folder (or, alternatively, index everything below it, but probably not), we might want to alter the context-menu text to indicate that these were folders instead of files, and probably some other things that I'm overlooking.

    Anyway, if someone contributed a patch to allow this, I imagine we'd accept it.
  • Alright. Thanks for thinking about it.

    You said this isn't a common request-- why not? How do others deal with the situation where we might have a folder containing multiple files? Do others just not organize as many files as I do, instead preferring to link to websites?
  • edited September 1, 2013
    I think few people organize large number of images in Zotero in the first place - I'd guess mainly historians and art historians. Among those, I think that frequently it's one image --> one item. E.g. when you're thinking about digital images of archival documents.
    Finally, at least for me, where I have several images that belong together I always compile them into a PDF, everything else is a mess.

    As for a workaround, you can tag items that you mean as links to an entire folder with a colored tag, that way they'd be easy to recognize.
  • This an old post but I upvote the request.
  • I also upvote the request. Here is why:
    Recently I want to manage my notes with Zotero. I often take a note in a markdown file when I read a paper or start a project, while all related pictures are in the same directory where the markdown file is. I will modify my note now and then so I can't just zip it and drop into Zotero. Meanwhile, I don't want to use MS Word or other word processing software to do the work, because I'm used to writing in VIM.
  • This more than nice to have...Maybe you can work around the problem:
    when creating "journal article" then one or more "added linked url" can be added to Attachments. then by pasting directory adress ie "C:\Users\d0000\Documents\" you will reach it but with 3 clicks: first in Zotero to "downoad attachment" that will open the adress in your browser (ie firefox), second one in the command line of the browser to let appear "consult"...third on "consult" (not sure about consult as I am not working in an english environment...)
  • edited February 25, 2021
    works with Firefox
    Doesn't work with google chrome

    work in web interface
    Doesn't work (for me) in the standalone as there is only info notes tags and related categories, attachments appear only in the www environment

    Seems to work with any type document that allow the category "attachments"
  • I have come up to a solution to this problem. It's super easy and fairly elegant all things considered.

    1. Right click on the folder you wish to add to Zotero and click 'Create Shortcut'
    2. Right click on the shortcut file created (.lnk file) and select 'copy as path'
    3. Create a .txt file and enter the following on the first line of the document: @echo off
    4. Hit enter to move down a line and then paste the path that has been copied to your clipboard
    5. Click 'File, Save As' and chose the 'All files (*.*)' option in the 'Save as type' drop down
    6. Rename your file to '(filename).bat'
    7. Add this .bat file to Zotero as you would any other file
    8. Right click on both the shortcut (.lnk file) and .bat file, click 'Properties' then 'General' and select 'Hidden' in the 'Attributes' section.

    You now have a link to a folder in Zotero! This works by creating a batch file to execute a command prompt in CMD with the instructions to open the 'shortcut.lnk' file you have created. By choosing to set these newly create files as hidden, you can link to folders without adding any clutter to your beautifully arranged file system!

  • My solution on Windows

    Setup (once only):
    Download and install Report customizer Add on:
    https://github.com/retorquere/zotero-report-customizer

    Then, to create a 2 way link between a folder and a Zotero item:

    1. create a Zotero report html file for the Zotero item (right-click>Generate Report from Item) and save it in the folder you wish to link.
    2. right-click Zotero item and select "Add Attachment>Attach Link to File" & choose report html file that you have just saved.

    You now have a two way connection between the Zotero item and the associated folder:
    1. to select the Zotero item from the folder click the Zotero select link in the report html file
    2. to open the folder from Zotero right click the html file link and select "Show File"

  • Here's another potential hack for PC users until we can get this working as a regular tool of Zotero. I agree we need it.

    Create a note in a collection related to this project. Name it something like OPEN PROJECT FOLDER and create a link with "file://" followed by the path to the folder, like this:

    file://C:\Users\Donna Baker\Dropbox\Zotero Attachments\Golden Channel Publishing\_Services\Speaking\Clients\SLIG"\SLIG 2024

    First time only, it opens a Launch Application window. Browse for c:/Windows/explorer.exe and mark that you want it to remember this option.

    From then on, the link opens the Windows File Manager to your folder. Creating new notes with new links still goes straight to the folder.

    ---
    Can a Mac user see if there is a Mac alternative?
    ---
    And I wrap with this appeal. Zotero has become my front door into all my work. Many of my projects depend on folders on my PC that are filled with junk of temporary value. Scraps. Important for a moment, but constantly changing and not something I want to store in Zotero or link to individually. An official feature to open folders allows me to get to all this momentarily valuable junk through my front door. It saves me a LOT of time. Thanks!
Sign In or Register to comment.