This is the latest update of a note I first posted four years ago. Below is a summary of what I’m trying to do, then the revised solution.
I use both Zotero and Endnote to do bibliographies. References that I have as pdf files I keep in a folder on D: drive. I have set Zotero to use a custom directory for these: d:/bibfiles.
It is often convenient to have my Zotero data in an Endnote library. Zotero can export data to Endnote in RIS format, and I want to have the locations of the pdfs included in the Zotero export file. The problem has been that, out of the box, if you tell Zotero that the export file should include pdf locations, Zotero will give you an ris file with ‘internal locations’, and these cannot be directly imported into Endnote. In addition, Zotero will also copy ALL the pdfs into a subdirectory below the export file. I have close to 40g of pdfs in my directory, so this is NOT what I want. I just want the pdf file locations in the export file, not copies of the pdf files.
Here is the recipe to fix this problem. You can change Zotero’s default behavior by editing the ris.js file under the zotero/translators directory. Search for the phrase ‘local file’. Under this phrase there are two lines:
Edit the first line to read
Then comment out the second one:
The first edit will produce an ris export file with the attachment filenames using the correct directory name, i.e. d:/bibfiles/ref1.pdf etc. The second edit will keep Zotero from trying to copy all the pdfs in d:/bibfiles in a subdirectory under your ris export file.
An important caution! The ris.js file is sometimes automatically updated when a new version of Zotero is installed. This will wipe out any changes you do, and cause Zotero to revert to its default behavior. You should check whether the ris.js still has your edits in it before you use it. If you want the default behavior back, you will have to revert the changes yourself. Adding an extra option in the Zotero menus for this type of export may be possible, but it is far beyond my abilities at this point.