Menu

relative links to the external files

Anonymous
2011-10-06
2012-11-08
  • Anonymous

    Anonymous - 2011-10-06

    now the links in my databases are absolute, for example
    c:\articles\topic1\article1.pdf

    is there a way to make them relative to the directory where database itself is
    located,
    e.g.
    topic1\article1.pdf

    Thanks!

     
  • Morten Omholt Alver

    Yes, this is possible. Under File -> Database properties, you can set a
    database-specific file directory which will override the setting in
    Preferences. To indicate a path relative to the bib file, you can use a path
    starting with a "." (dot). Just the dot will set the file directory to the
    same one as the bib file is located in, and for instance "./pdfs" will point
    to a directory named "pdfs" below the directory where the bib file is located.

     
  • Anonymous

    Anonymous - 2011-10-06

    Thank you! (for the answer and for your great program!)

    is it also possible to convert the existing database from abslolute to
    relative links within jabref?

    (I guess one can also do it manually, by simply removing all the absolute
    directory prefixes in a text editor)…

     
  • Morten Omholt Alver

    You'll have to do a string replace to update your existing entries. If you do
    it within JabRef (Tools -> Replace string) you have the option to limit the
    replace to the "file" field to avoid accidental changes in other fields,
    although I guess there's not much risk of it in this case.

     
  • Anonymous

    Anonymous - 2011-10-07

    Thank you again, mortenalver!

    Does this (Tools -> Replace string) search use regular expressions or not?

    To my embarrassment, I'm not able to replace "c:\articles\" (with or without
    double quotes)
    with an empty string, using this tool

    (while replacing just "articles" with an empty string works).

     
  • Morten Omholt Alver

    It's plain text only, not regular expressions. You could try using double
    backspaces (and no quotes).

     
  • Anonymous

    Anonymous - 2011-10-07

    Thank you for suggestion, mortenalver

    entering the string exactly as it appears in the bib file in the ''file''
    field , i.e.
    C\:\\articles\\

    did actually help!

    great software!