Problem with file paths in Windows

I just upgraded Firefox ESR to 31.1.1 and the version of Zotero I am using is Zotero 4.0.19 on Windows 7. I do not use the default Zotero location to save pdf files attached to Zotero records, but rather my own folder which is c:\data\pdf files\. I was entering a record manually with the following URL, where Zotero should find the pdf: c:\data\pdf files\james_2013.pdf. When I tried to open the pdf in Zotero, I got the following error message:

The file /c:/data/pdf files/james_2013.pdf cannot be found. ...

Why did Zotero change what I had entered in the URL field, and how can I fix this problem?

Thanks for your help.

Steve Jenkins
  • You should update Zotero. Current version is 4.0.24
  • But if I understand you correctly, you're trying to add a file link (as an attachment to an item?) For that, you should use Attach Link to File, not Attach Link to URI.
  • I upgraded to version 4.0.24 and get the same error. I don't understand your second suggestion. I'm just trying to tell Zotero where to find the file, so that when I click on the record in the main panel, the pdf will appear. This has worked seamlessly ever since I began using Zotero several years ago, but all of a sudden doesn't work. Perhaps I need to revert to an earlier version? If so, how do I do that?

    Thanks again,

    Steve
  • don't understand your second suggestion. I'm just trying to tell Zotero where to find the file, so that when I click on the record in the main panel, the pdf will appear.
    How exactly are you doing this? What menu/button/command are you using? If you're doing this right, there should be no way for you to type in the path. You should be selecting the actual file in the dialog that pops up.
  • edited December 3, 2014
    I think I solved the problem, at least in part -- it was specific to the new record I created, rather than a problem with Zotero.

    Here is some background about what I was trying to do. In many cases, the web is the source of new records, for example, a news story in the New York Times or a journal article in Science. In these cases, I often use the translator to import the record into my Zotero database, then add tags and make whatever modifications I need for a consistent style in my database (e.g., convert titles to sentence case if they don't come in that way).

    In these situations, the URL field of the record stores the web address for the source of the record. But I have a large number of legacy records from previous bibliographic databases I used. I have pdfs of many of these records stored on my hard drive, so I have a path to these pdf files in the URL field of my Zotero database (these aren't attachments, but rather paths to the locations of the pdf files).

    When I enter new records, I sometimes want to save a pdf rather than rely on the online source. For example, I may have annotated some of these pdfs, so I want to open the pdf from Zotero rather than the original online source.

    I think the pdf that I was trying to register in the URL field of a new Zotero record yesterday must have had some restrictions disallowing this.

    Thanks again for your help.

    Steve
  • I have pdfs of many of these records stored on my hard drive, so I have a path to these pdf files in the URL field of my Zotero database (these aren't attachments, but rather paths to the locations of the pdf files).
    That's a bad idea. The URL field can -- and does -- show up in citations and having a filepath there is clearly non-sensical. Zotero's "Attach link to File" function (under the paperclip) is what you want to be using for this.
  • That's a good suggestion. It permits easy access to both a pdf and a web link for a record, which might contain different information.

    Part of the reason I set it up the way I did is that I imported a substantial number of records from an EndNote database to Zotero, and my URL field in EndNote contained these filepaths to my pdfs. So this was a relatively painless way to transfer records from EndNote to Zotero.

    I don't suppose there's a way to automate the process of transferring the contents of my URL fields for these records to attached links. It probably would require editing the zotero.sqlite file, which I may take a look at doing sometime.
  • It's not easy, not, but can be done through the Javascript API (via Scratchpad or JS Execute e.g.): https://www.zotero.org/support/dev/client_coding/javascript_api
    Even if you know what you're doing, we generally warn against modifying the sqlite directly.
Sign In or Register to comment.