Create Zotero library using disk directory structure

  • (It looks like the plugin only has English strings currently, so if your Zotero is set to a language other than English, display of the options dialog would fail unless you switched the language to English in the Advanced pane of the preferences.)
  • @dstillman I do have several languages in Windows, but the default language is English, as well as the language of Zotero is set to English.
  • edited February 14, 2020
    Oh yeah the plugin is more a proof of concept than anything, but the missing string is actually worse -- the dialog used a string that's only defined if you have BBT loaded. Oops. New version should be up now. It's still English-only, but all the strings are hard-coded. The idea is still to flesh this out and then to submit a PR, but having it as a plugin now allows user-testing more easily.

    @depswa the error you see is now gone -- the plugin also allows you to choose whether you want to link or store, and will list all extensions in the import dir. The UI is beyond ugly, partially because it's getting harder and harder to find docs or support from Mozilla (I've re-ordered the O'Reilly "Building RIAs with XUL" since I've misplaced my copy, but I doubt that covers everything I need), and partially because I really, really don't like UI work. But if you're currently helped -- great!
  • I installed the Add-on but do not find any description of how to use it. I tried dragging and dropping one or more folders to the library/collection area or in the article pane, but nothing happens. What should I do?
  • Really thanks for teaching me how to read again :-) I have read that passage many times, but somehow it slipped out. It works really well for me. Precisely what I wanted.

    I saw another user requesting the same feature, but instead of associating a collection with the files in directory, he used tags. So, in a future version, in case you or someone else further develops this, one could perhaps think of something along these lines.

    But for now, this precisely fits my bill! Thanks a lot!
  • No worries.

    I'm open to adding the tagging stuff, but I built the plugin pretty much as a prototype for a PR to submit to Zotero. The more functionality I add, the larger the chunk of work is they have to accept or deny.

    There's also the thing that more choices means more UI, and I really do not like UI work.
  • edited April 11, 2020
    I'm very impressed with you guys trying work this out. I too have hundreds of folders and various docs. I'm doing the one-by-one important. If I were very disciplined over the years and had a set-in-stone hierarchy as well as tags for each category, which remained useful/accurate to my thinking today, then a full-blown import would be a god-send. However, overtime my categorization/tag/hierarchy has changed, making the one-by-one import a chance for me to rethink everything and Zoteroize the whole sha-bang.

    Being able to re-tag an item just by renaming the tag is fantastic, and moving/creating collections at will enables me to continually refine my physical structures to match my evolving thought structures.

    Not to discourage your efforts, and again I'm impressed, but moving a matured structure into Zotero may also be time for someone to rethink as it pertains to physical structures and retaging.
  • I definitely see your point and I gave it some thoughts before giving it up. Sometimes, like in my case, rethinking before adding is a luxury you cannot afford time wise.

    It is in this case the work done by emilianoeheyns is a HUGE time saver, for which I am VERY grateful!!! I fully appreciate his non-love for UI work. And his strategy for making this feature part of the standard, rather than an add-on is well thought out.

    Once everything is in Zoterro, making up independent hierarchies etc. is super and of course a feature that is not available in a file structure. I am using X1 full text search, and at some point, I could imagine that I would like to search all papers containing a certain set of phrases and add a category or a set of tags to point at these papers.

    In that respect, one could think of a new standard feature in Zoterro, where a category hierarchy could be transformed into a set of tags and vice versa. That, btw, would save having to choose between tags or categories on import. It would not matter, since one could easily change it afterwards.

    One could also think about an "external" tagging mechanism, by which a list file names of articles already in Zoterro was produced by another search tool (like X1) and then using this external list as input for a tagging those entries with certain tags.
  • Thx for commenting. I will be purchasing the X1 tool. I've noticed that as I add full articles and several books to Zotero that the addition of new entries is slowing down. Indexing whole books is pushing things I suspect. So I began to wonder how to get around that to accomplish exactly what you described. So, thx again.

    On the file level and even on the text level I've used FileLocator Pro (free or very cheap versions) which for files is lightening fast in a search of tens of thousands of files/folders. It was fine when I worked in IT, but now that I'm doing research which is text based I needed something dedicated to that task.
  • this seems incredibly useful to me @emilianoeheyns, thanks for your work. I have a question though, I hope you can please help me out. The python version still gives me errors with unicode characters. The plugin version works fine, but it doesn't let me choose extensions. I want to do it separately for pdfs so that I can batch retrieve metadata after importing (it's a problem otherwise because I can't seem to sort my library by file extension).

    Any ideas? thanks!
  • In what sense doesn't the plugin let you choose extensions? You do not get the popup? It could take long to populate the UI, it won't show anything until the full scan is done.
  • Thanks emiliano. I don't get a popup. What I get during the scanning process are Chrome "open file" popups as the scanning bumps into .url files

    I have version installed, I'm on windows 7.

    And I do get the xml error in the beginning:

    XML Parsing Error: undefined entity
    Location: chrome://zotero-folder-import/content/import.xul
    Line Number 4, Column 1:<dialog xmlns=""
  • (I don't have access to a Windows machine, so I can't test. Not sure why listing a directory with an .url file should mean anything special)
  • thanks again! I will install the new version and test it later today.

    I was just mentioning the only thing that popped up. It seems like as it scans, the files are opened? maybe it only happens with .url files that link to a pdf, I would need to check.
  • I managed to run a quick check now and it runs flawlessly, thanks!

    And the chrome "what do you want to do with this file" window does only open up with urls pointing to pdfs.

    I haven't tried the linlk/copy options, in any case, I'm interested in links only, that's why I originally got here.
  • I have no idea why that is happening. I'm just asking OS.File.DirectoryIterator to list all files in the directory. It's not supposed to actually open the files in anyway.

    Getting support for this kind of thing is stupid hard because the tech it uses is considered deprecated by Mozilla for extension building. In that sense (only) I look forward to the move to Electron.
  • And the chrome "what do you want to do with this file" window does only open up with urls pointing to pdfs.


  • I do exclude .lnk files if you choose import rather than link, and I could see how an import might have Zotero open the file, and that could trigger bla-die-bla. I can exclude .url files too if that helps.
  • thanks Emiliano. No worries, I was just mentioning the behaviour, it's not really a serious issue
  • Hello guys!

    I am a new user of zotero and i am in the same situation as the user who created this thread initially. I understood how to use the plugin you recommended and everything, however, when I do that and import my folder into zotero, will zotero save these files somewhere else? I mean, will these files be duplicated on my computer initially? A copy of them in the folder where they are now and another one where the zotero will save them, or will they be saved only in the folder where they are now and will any changes I make to them using the zotero be saved in that folder anyway?
  • I would love to hear a response to llsico's question as well
  • Just found this plugin and wanted to thank the creator. You have my immense gratitude. This is a life saver.
  • The plugin will import, not link attachments, so yes, they'd exist twice on disk directly after import.
Sign In or Register to comment.