Rename linked attachment with Zotfile rule, but keep it in the original directory

edited January 10, 2024
I often have Zotero items with linked pdf files as attachments.
The location of those pdf files is a directory of mine, e.g. C:\Data\articles.
Not a Zotfile directory, nor a Zotero directory.

Say, I have a pdf C:\Data\articles\98acvdsf-main.pdf, and I have an item in Zotero that has this pdf as a linked attachment.
I want zotero/zotfile to rename the file on disk to something like Effect_of_initial_stress_on_theRobinson2019.pdf (stemming from Zotfile rule, format {%t}{%a}{%y}), but keeping it in C:\Data\articles. I want also that Zotero updates the link to the new name.
Is there any way to achieve this?
The closest to this I found is:

1. Right click -> Rename File from Parent Metadata.
But this uses Zotero rules, not Zotfile.
2. Right click -> Manage Attachments -> Rename and Move.
This uses Zotfile rules as above, but it also moves the attachments to Zotero/Zotfile directories.
I want this, without the Move part.

Related:
1. https://forums.zotero.org/discussion/82766/renaming-rules-not-taken-into-account
2. https://superuser.com/questions/542078/how-to-use-zoterozotfile-to-rename-all-pdf-files-in-a-directory
  • I can't help with ZotFile, but note that Zotero 7, currently in beta, includes much more advanced renaming options.
  • edited January 9, 2024
    I am not entirely clear on the problem. If as you say you have existing *linked-file* PDFs (not locally stored PDFs) they are presumably already in Zotfile's Custom Location folder (as set under Zotfile Preferences\General Settings), where you want to keep them, correct ?

    And so when you use (Zotfile's) right-click Rename and Move on any such PDFs, they should be renamed (according to your Zotfile rule) but should remain where they are, in the Custom Location folder. So "without the move" ... as you say you want.

    Only a PDF still in local Zotero storage (under Zotero\storage) would be changed/moved to a linked file by that operation (if there is a Custom Location setting). And the PDF would get renamed by Zotfile too (if you don't have Use Zotero to Rename set to ON in Zotfile Preferences).

  • Would you know if what I am asking is included?
  • Yes, as I say if your linked PDF is in the Custom Location folder it will stay there when you use right-click Rename and Move to rename the PDF.
  • If you have a PDF in a random linked location ZotFile would still move it to the designated custom folder though, right? (Zotero's own rename would leave it at its location so if you're asking about that with 'is included' the answer is yes).
  • edited January 10, 2024
    @dstillman @tim820 @adamsmith

    I was not clear in my original question (now edited).
    The location of the PDF file that I am linking to in Zotero is a directory of mine. Not a Zotfile directory, nor a Zotero directory.
    I would like that original file to be renamed as per my pattern set in Zotfile options, but without changing its location, and the corresponding link in Zotero to be accordingly updated.

    The question "Would you know if what I am asking is included?" referred to "Zotero 7, currently in beta, includes much more advanced renaming options."
  • The question "Would you know if what I am asking is included?" referred to "Zotero 7, currently in beta, includes much more advanced renaming options."
    It's still not clear what you're asking. As I said, Zotero 7 has much more advanced renaming functionality, similar to (and in some ways more advanced than) ZotFile's. It works on linked files. You can try it if you want to.
Sign In or Register to comment.