JabRef: Relative File Directory for Database and Files added to Entries

Hi everyone,

I am running JabRef and I have run into a weird behaviour I cannot comprehend. It is about adding a pdf file to an already existing entry via the “File” field in the “General” tab of an entry.

Minimum working example:
Create a folder testpdfs and a new database, saved as test.bib in the same folder as testpdfs. Set the general directory to .\testpdfs\ in Database Properties -> General File Directory. Add an empty entry (I choose Article class because that is my most common document). Navigate to the “General” tab of this entry and try to drag&drop a pdf (test.pdf) into the file field. A popup appears asking how test.pdf should be linked to the entry. Choose “Copy file to file directory” and press OK.
The file is not copied into \testpdfs\ and the file path entry uses the absolute file path to the current file directory.

I do not understand why JabRef does not copy my pdf to the folder \testpdfs\ and links that as a relative file. I would be very thankful for any help.

Hello Lordi,

as there have been recently some fixes made to the file move/copy logic in JabRef regarding linking an entry, I would advise you to try the latest dev version from here.

As this is a development version of the upcoming 4.0.0 release we advise you to make a backup of your settings and bib files.

In General, you should choose an absolute directoy in the preferences. JabRef will automatically make the links relative (or you run the cleanup operation)


Hello Christoph,

thank you a lot for the kind reply.
The reason why I want to specify a relative path in the settings is that I want to set up a shared bibtex-file on a network drive which has different absolute file paths for different users. I will try out the dev version (or wait for version 4.0.0) however.
On a side note, if I drag&drop a file into the database creating a new entry, everything works as it should with relative file paths (which means that just creating a new entry and deleting the old one is a reasonable way to avoid any issues if the document has a DOI).

Kind regards