Import RIS format with long file names in PDF attachments

I am trying to import my EndNote library with over 1200 references into Zotero through the RIS format (using Windows XP). I have managed to do this succesfully for some records following all steps discussed in the forums, regarding renaming file paths, etc. However, I still face a problem with records where the PDF attachment has a very long file name (aprox >150 characters).

I could fix these manually since there are probably not too many, but since Zotero stops importing records altogether when facing a long file name, I cannot identify which are the problematic ones, or keep working with the rest.

My questions are:
a) Is there a way to circumnaviage the maximum file length restriction?
b) Can I force Zotero to skip the problematic record and keep importing the next one?

Thank you for your help
  • Either of these would require a code change. It would be fairly trivial to add a check on the URL field length before trying to make an attachment to the RIS translator. But I'd also be a little surprised if the number of characters was responsible for the issue you're seeing (the URL length limit is certainly orders of magnitude larger than 150 characters). Do you have an example of a failing record?
  • the URL length limit is certainly orders of magnitude larger than 150 characters
    URL length limit is, but not necessarily path length limit on Windows (which can be ~255 under some circumstances).
  • Thanks for your replies. I think this has to do with the file path and/or file name length, since all the special characters (parenthesis, spaces and dashes) work with a shorter name. The maximum threshold seems to be around 150 characters in the file name.

    Here is an example. Below I have pasted a RIS entry that imports without any problem. However, it doesn't when I replace the L1 line with the following one, which is just the same file but with a slightly longer name (168 vs 126 characters)

    L1 - file://F:/Pablo/PhD/Lit Review/Reading/abbotts et al (1999) Association of medical, physiological, behavioural and socio-economic factors with elevated mortality in men of Irish heritage in West Scotland.pdf

    Then I get the following error message, and the reference is not imported at all:
    [JavaScript Application] “An error occurred while trying to import the selected file. Please ensure that the file is valid and try again”

    Any clues?
    Thanks for your help

    -------------- The entry that works ---------------
    TY - JOUR
    AU - Abbotts, J.
    AU - Williams, R.
    AU - Smith, G. D.
    PY - 1999
    TI - Association of medical, physiological, behavioural and socio-economic factors with elevated mortality in men of Irish heritage in West Scotland
    SP - 46-54
    N1 - Mar
    JF - Journal of Public Health Medicine
    VL - 21
    IS - 1
    N1 - Association of medical, physiological, behavioural and socio-economic factors with elevated mortality in men of Irish heritage in West Scotland
    N1 - 10321859
    N1 - 0957-4832 (Print)
    L1 - file://F:/Pablo/PhD/Lit Review/Reading/abbotts et al (1999) Association of medical, physiological, behavioural and socio-economic factors with elevated mortality.pdf
    KW - Adult
    N2 - BACKGROUND: Men with patrilineal Irish descent from the immigrations of the nineteenth and twentieth centuries have higher death rates from 'all-causes' and,
    AD - MRC Medical Sociology Unit, Glasgow.
    UR - http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&dopt=Citation&list_uids=10321859
    ID - 730
    ER -
  • Ticket created. We have some error handling for filename/path length limits for file sync, but not for import.

    If you're curious you can calculate the path length limit by figuring out the length of file you're able to import. I'm guessing it's somewhere around 260 - (length of path to Zotero 'storage' directory + slash + eight-character-folder-name + slash).
  • Dear Dan, thanks for your comments and action to look at this issue.

    I have identified something else that might be related to long file names
    When exporting to RIS from EndNote using "RefMan(RIS)Export" style, I get file names that are truncated and repeated with a strange number code added inside them. Here is an example before replacing the "internal-pdf" bit
    I would appreciate your help on this
    Pablo
    ----
    TY - JOUR
    AU - Raghavan, U.N.
    AU - Albert, R.
    AU - Kumara, S.
    PY - 2007
    TI - Near linear time algorithm to detect community structures in large-scale networks
    SP - 036106
    JF - Phys Rev E
    VL - 76
    N1 - Near linear time algorithm to detect community structures in large-scale networks
    L1 - internal-pdf://Raghavan et al (2007) Near linear time algorithm to detect community structures in large-scale netw-0765993231/Raghavan et al (2007) Near linear time algorithm to detect community structures in large-scale networks.pdf
    ID - 1654
    ER -

This is an old discussion that has not been active in a long time. Instead of commenting here, you should start a new discussion. If you think the content of this discussion is still relevant, you can link to it from your new discussion.