09-01-2016 01:39 AM
I am trying to fix broken file attachment links by finding and replacing text in a text file of references that is exported from Endnote by selecting the "Show All Fields" as the "Output Style". I then tried importing the text file of references back into a new Endnote library using the "Endnote Import" option but nothing happened.
Has anyone got any suggestions for this problem?
09-01-2016 05:49 PM
The reason why the text file is not importing into Endnote is because the “tags” which mark the data fields do not match up with the tags in the Endnote Import filter. (Refer to attached image.) The tags in both files must match.
Odd, but there doesn’t seem to be an import filter available to allow importing the Show All Fields Endnote output style data back into Endnote’s. However, users can create their own filter. If you need assistance please provide a “Show All Fields” exported text file containing sample records illustrating the various reference types in your library (e.g. Journal Article, Book, Edited Book). You could do this by creating a new Endnote library and just copy an example of the reference type then export the library data using the Show All Fields output style file.
09-01-2016 07:21 PM
Yes, thanks for confirming. It is odd they don't provide a filter for "Show all fields". I primarily want an export that preserve as much of the data as possible. I am relatively new to EndNote (had mostly been using Zotero but colleagues mostly use EndNote and we are conducting a systematic review). I found on browsing that I can use "Endnote Export" which corresponds to "Endnote Import".
It's still not an entirely smooth/seamless import, because it seems not to correctly export and import multiple file attachments or URLs. I had to find and add %> or %U to the beginning of the additional links. Not sure if it's because I had to do it on a PC because my Mac version seems a bit idiosyncratic at best (it won't do a thing with the export even though it had worked before).
09-06-2016 07:36 PM
Update: It is the space in file names that is an issue when links are used (i.e. I don't need to "add %> or %U to the beginning of the additional links"). The spaces need to be replaced with "%20". It is a pain because I can't replace all spaces in the text file, and I need to use an advanced text editing script such as sed, awk or perl to do the job (and I don't write text editing scripts that much anymore these days).
09-07-2016 12:30 AM
I finally managed to get this to work using the sed command line in my Mac terminal. I needed to do this for the RIS file import from Zotero, which has file attachments as "file/(a number)/(file name).pdf"
"/localhost/Users/(me)/Documents/RIS/file/" is the directory under which I consolidated the pdf.
Below is the code I used:
#To check it works
#for the first file attachment: replaced " files/..." with "_files/..." so the space doesn't get replaced with "%20".
sed -e 's/ files\//_file:\/\/localhost\/Users\/(me)\/Documents\/RIS\/file\//g' Endnote_export_file.txt | more
#for records with more than one file attachment.
sed -e 's/^files\//file:\/\/localhost\/Users\/(me)\/Documents\/RIS\/file\//g' Endnote_export_file.txt | more
sed -e 's/ files\//_file:\/\/localhost\/Users\/(me)\/Documents\/RIS\/file\//g' Endnote_export_file.txt > file1.txt
sed -e 's/^files\//file:\/\/localhost\/Users\/(me)\/Documents\/RIS\/file\//g' file1.txt > file2.txt
#replace " " with "%20" for file attachment links
sed -e '/file:/s/ /%20/g' file2.txt | more
sed -e '/file:/s/ /%20/g' file2.txt > file3.txt
#replace "_file:" with " file:" for the first file attachment
sed -e 's/_file:/ file:/g' file3.txt | more
sed -e 's/_file:/ file:/g' file3.txt > file4.txt
Then import file4.txt using Endnote import filter.