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

**URL:** <https://discourse.jabref.org/t/jabref-relative-file-directory-for-database-and-files-added-to-entries/534>\
**Category:** Help\
**Created:** [March 23, 2017, 1:03pm UTC](https://discourse.jabref.org/t/jabref-relative-file-directory-for-database-and-files-added-to-entries/534 "2017-03-23T13:03:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lordi](https://avatars.discourse-cdn.com/v4/letter/l/e274bd/32.png) [@Lordi](https://discourse.jabref.org/u/Lordi)\
**Post date:** [March 23, 2017, 1:03pm UTC](https://discourse.jabref.org/t/jabref-relative-file-directory-for-database-and-files-added-to-entries/534/1 "2017-03-23T13:03:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Siedlerchr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/siedlerchr/32/216_2.png) [@Siedlerchr](https://discourse.jabref.org/u/Siedlerchr)\
**Post date:** [March 25, 2017, 8:55pm UTC](https://discourse.jabref.org/t/jabref-relative-file-directory-for-database-and-files-added-to-entries/534/2 "2017-03-25T20:55:10Z")

</div>

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.  
[http://builds.jabref.org/master/](http://builds.jabref.org/master/)

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)

Regards  
Christoph

---

<div class="post-metadata">

**Author:** ![Lordi](https://avatars.discourse-cdn.com/v4/letter/l/e274bd/32.png) [@Lordi](https://discourse.jabref.org/u/Lordi)\
**Post date:** [March 27, 2017, 8:06am UTC](https://discourse.jabref.org/t/jabref-relative-file-directory-for-database-and-files-added-to-entries/534/3 "2017-03-27T08:06:44Z")

</div>

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  
Lordi
