Zotfile : renaming after creating a new item from existing pdf creates a second pdf
Hello,
I use Zotfile all the time to rename files and have them in my pdf file hierarchy, and it is just great, could not do without it.
I have also discovered the (I think relatively new) option to just drop a pdf onto Zotero, which will then create the item automatically in the open folder. Zotero does in this case not just link the pdf file to the item, but copies the pdf into its own folder system.
So I was using Zotfile's "Rename Attachments" to get the file back where it was and get a linked attachment.
However, the original file does still exist, and so Zotfile creates a new one, with "22" as year (I have the naming rule of FirstAuthorName.YYYY.pdf, and from a file which was "Smith.2021.pdf" I get "Smith.22.pdf"). So the result is that I have the pdf now twice in the folder, and the file linked to Zotero has a wrong name. The file with the correct name is not linked.
As this took a while to discover, I have quite some pdfs in double now ...
Zotfile also does this when one imports (e.g. web importer) an pdf of an author who had already published a paper this year. So Smith.2021.pdf is already existing, Zotfile will create then again Smith.22.pdf. In this case it would be great if Zotfile could rather create "Smith.2021.b.pdf" or "Smith.2021.2.pdf", rather than "22". But this case could conflict with the above case.
One solution would be if Zotero could have an option, that when a pdf is dropped and the item created this way, that then the attachment is linked rather than copied. I have tried some key combinations, CTRL+drop, ALT+drop, but these do not seem to change anything (ALT+drop changes from "Copier" to "-> "le déplacement" (even though I have Zotero in English, this is shown in French, probably because my system is French), but the resulting action does not seem changed in Zotero.
The other solution would be that Zotfile recognizes that there is already an existing file with the name, and ask if this file should be replaced or the new file renamed.
Cheers
I use Zotfile all the time to rename files and have them in my pdf file hierarchy, and it is just great, could not do without it.
I have also discovered the (I think relatively new) option to just drop a pdf onto Zotero, which will then create the item automatically in the open folder. Zotero does in this case not just link the pdf file to the item, but copies the pdf into its own folder system.
So I was using Zotfile's "Rename Attachments" to get the file back where it was and get a linked attachment.
However, the original file does still exist, and so Zotfile creates a new one, with "22" as year (I have the naming rule of FirstAuthorName.YYYY.pdf, and from a file which was "Smith.2021.pdf" I get "Smith.22.pdf"). So the result is that I have the pdf now twice in the folder, and the file linked to Zotero has a wrong name. The file with the correct name is not linked.
As this took a while to discover, I have quite some pdfs in double now ...
Zotfile also does this when one imports (e.g. web importer) an pdf of an author who had already published a paper this year. So Smith.2021.pdf is already existing, Zotfile will create then again Smith.22.pdf. In this case it would be great if Zotfile could rather create "Smith.2021.b.pdf" or "Smith.2021.2.pdf", rather than "22". But this case could conflict with the above case.
One solution would be if Zotero could have an option, that when a pdf is dropped and the item created this way, that then the attachment is linked rather than copied. I have tried some key combinations, CTRL+drop, ALT+drop, but these do not seem to change anything (ALT+drop changes from "Copier" to "-> "le déplacement" (even though I have Zotero in English, this is shown in French, probably because my system is French), but the resulting action does not seem changed in Zotero.
The other solution would be that Zotfile recognizes that there is already an existing file with the name, and ask if this file should be replaced or the new file renamed.
Cheers
I am still having this exact problem with the latest version of Zotero (6.0.21) and Zotfile.
Just wondered if this was ever addressed?
When there is more than one pdf in my library with the same author and year i.e Lee_2010 the second file becomes Lee_22 (although is still named Lee_2010 the same as the other file within Zotero. The new name only appears in the linked file storage folder
Many thanks
Zotfile is not getting much work done on it these days, although there was a new version in October last year. You can raise an issue here:
https://github.com/jlegewie/zotfile
You are right, it must be something to do with my selected naming convention as when I tried to rename the files as you have done and included the title, there was a "2" appended to the file name. I have the latest Zotfile installed and have also set my renaming preference to 'Use Zotero to rename' set to off.
It's not the end of the world, I could use a longer file name, its just that I have my files sym-linked into Obsidian and prefer the shorter snappier names when referencing them :) and as you say it not frequent enough to cause major issues, just a minor inconvenience every now and then.
Many thanks, Will