Mendeley .bib import with linked files

I have decided to move from Mendeley to JabRef since they decided to discontinue the desktop client.

My Mendeley database contains several 1000nd linked pdf entries, which I would like to migrate into JabRef. The problem I ran into is that the linked files are correctly represented in the .bib file. Mendeley exports the following:

file = {:C$\backslash$:/Users/XXXXXX/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Brown - 2017 - Physical test methods for elastomers.pdf:pdf},

This is clearly not the correct format to create the link to the file. How do I have to manipulate the entries so that they all can be properly imported?

Thank you very much already for your help.

Hi,

thanks for giving JabRef a chance!

it seems like that for some reason the file field contains latex symbols:
It should be sufficient to replace the
$\backslash$ with a normal backslash, \ then JabRef should be able to parse it so that it looks like a normal windows path. Otherwise, the syntax is correct.
The path should look like C:/ or C:\. Although windows normally use backslashes, it should also work with forward slashes.

I advise copying the bib file before making any changes. You can use JabRef’s inbuilt search and replace function Edit → Find and Replace. There you have the option to limit this to the file field.

Hey Christoph,

Thank you so much for getting back to me so quickly. Your help is very much appreciated. I have managed to get my entire bibliography transferred without any problems with your help. I am already completely sold on JabRef – in other words, Mendeley is already uninstalled.

I made changes to the copied file in VS Codium, which I know really well, as you suggested, I replaced $\backslash$ with C:/, and I also removed the trailing :pdf at the end of the path.

I wasn’t able to import this for some reason. It never converted the path properly. However, by simply opening the path got properly imported.

1 Like

Glad to hear that it’s working well for you!

But nonetheless, I think it would make sense for JabRef to try to parse the files or replace the latex chars in the file path.

JabRef’s file field consists of 3 parts in general:

description:filepath:mimetype

You too can foster JabRef development with Code or Money.

@aq18507 Could you please give more details on your solution? I have the same issue (wanting to import my Mendeley library into JabRef).

Thank you!

I have hacked together a script that does the job. Since I cannot attach files here, I’ve uploaded it to github: GitHub - danielmalz/mendeley-to-jabref-script: A quick hack to modify a Mendeley-generated .bib file such that it can be imported into jabref with intact pdf links

3 Likes

@daniel1 thanks a lot for your script! We will try to integrate the logic into JabRef!

We tried to integrate the file logic at Support for $\backslash$ in file paths by koppor · Pull Request #9906 · JabRef/jabref · GitHub - only covering \backslash. Binaries should be available soon at index - powered by h5ai v0.29.0 (https://larsjung.de/h5ai/)

The other replacement seems to be our https://docs.jabref.org/finding-sorting-and-cleaning-entries/saveactions#latex-to-unicode functionality. That can be called from our cleanup menu at Cleanup entries - JabRef.

Hope, this works on your side.

Hello everybody,

do you know if Mendeley stopped including a file path in their exports?
I would like to move my library to Jabref, but I don’t see any file paths in the .bib or the .ris I exported from mendeley, and there are no files linked when I import them to Jabref.

Kind regards,

Julius

Hi there, I am in similar situation, coming from BibDesk (on MacOS). I want to try JabRef, because the development of BibDesk is stagnant and lots of things are clumsy for my use flow. Also now I have 10K+ bibtex entries and BibDesk seems to be slow, eats memory, get stuck entirely quite often.

One thing I appreciate of BibDesk though … the filename is not an absolute path like those we saw here. It’s a Base64-encoded pathnames string for the file identifier on the file system that keeps pointing to that file even if you move the file to another folder. I was wondering if JabRef supports anything like this or has plans to do that.

Best,
Roberto
I have written code to decode the Base64-encoded pathnames, other people on github has similar code available.

HI,

I think one solution would probably to create a BibDesk importer in JabRef which is based on the bibtex parser but could parse the special file stuff