Zotfile - Renaming Linked Files but NOT Moving Them

Hi everybody,

First off, zotero and zotfile are both excellent. Kudos to the development teams, keep up the good work.

Quick question I was wondering if anyone could help me with as it's driving me insane.

I've got a load of pdfs in lots of folders for different courses saved across my harddrive. I completely understand how to rename (retreive metadata, manage attachments etc.) files I've copied into Zotero.

However, I have a query regarding when I link files with Zotero/Zotfile (ctrl+shift and drag files into zotero). Everything links fine etc. However, once the linked file is renamed Zotfile moves it to a different directory. I'm aware that one can customise the directory to which these files are saved.

However, I DO NOT want these renamed files to be moved at all. I've got pdfs in literally hundreds and hundreds of folders. It'd be so much easier if Zotfile will just rename the linked file and leave it in its original source (linked) directory. Can anyone tell me if Zotfile has this functionality and, if so, how do I enable it? I feel like it's a very basic function that Zotfile would have but I can't find anything in its preferences and have had no luck after scouring the documentation and forums.

Otherwise for each folder I've got pdfs that zotero is linked to I'll have to copy the pdfs from the custom directory that zotfile puts the files after renaming them and put them back into the original source directory from which I originally linked them. As you can imagine, for hundreds of folders this will be extremely time consuming and I'd like to avoid such a process if possible.

Thanks for reading everybody. Any help would be greatly appreciated.



  • In the Zotfile Preferences, if you leave the "Custom Location" field blank, it should rename your files without moving them.
  • Thanks for getting back to me.

    So choosing custom location and leaving the field blank (shows a little exclamation mark in a red circle in preferences) in Zotfile does indeed not move the pdf. But it doesn't rename the pdf when that option is selected!!

    Following the same renaming process that I do for all other files - add linked file to the directory, retrieve metadata (which creates top-level item with linked file underneath), Manage Attachments -->, Rename Attachments, the top field in zotero (the field with the item in bold which when clicked displays a command window named 'Prompt' and contains 'New title:') gets renamed with my renaming rules but the Filename field does not change at all which is strange.

    Normally after following that process when I have the 'Attach stored copy of file(s)' option selected in Zotfile preferences and not the 'Custom Location' option, everything works like a breeze; after selecting the rename attachemnts option the linked file icon of the item I'm choosing to rename (indexed under the top-level item), changes to the pdf icon symbol and the filename is renamed. This does not happen with the blank 'Custom Location' option selected - the icon remains as the linked file icon and although the bold field at the top is renamed, the filename itself is untouched.

    That's the best that I can describe what's going on. Any ideas why the filename isn't being renamed with the blank 'Custom Location' option selected?? Completely at a loss here unfortunately.

    Many thanks
  • Okay, if you normally use “Attach Stored Copy of Files”, you will want to stick with that. I’m not exactly sure why linked attachments aren’t renaming under that setting (if it’s a bug or a technical limitation). You will need to report that to the Zotfile developer on the Zotfile GitHub page. Note though, that Zotero can natively rename linked attachments (though it can only use Author, title, and year fields).
  • Thanks for your help then.

    I've only had Zotero for a couple of weeks so I've only normally used the 'Attach Stored Copy of Files' option because that's all that I was aware of.

    The blank 'Custom Location' option works for yourself (and others) does it? Renaming the linked file in the source directory without moving it? It's hard to imagine I've been the only one wanting to do this over the years!

    Strange that the renaming doesn't work by keeping the linked files in the source location. I'll report the issue; I hope it should be a very simple option to have a checkbox implemented in that menu saying 'Rename (linked) files in source directory'.

  • It used to work for others (I don’t ever use linked attachments, so I couldn’t say from my own experience). It apparently broke at some point.

    If you use “Attach Stored Copy of Files”, that field is irrelevant, so don’t worry about it. I believe that renaming linked attachments with the “Attach Stored...” option used to work, but I’m not sure. If it did work, it’s likely that it broke in the move to Zotero 5.0.

    (The “Attach Stored...” option is essentially what you are saying about the checkbox—it tells Zotfile just to rename the files, not move them anywhere.)
  • No worries.

    Thanks for all the info.

    I've reported the bug on the Zotfile forum (https://forums.zotero.org/discussion/5301/zotfile-advanced-pdf-management-for-zotero/p54)

    Thanks again
  • Have the same problem and renaming doesn't work. Did this get resolved?

    Zotero can do it fine, but Zotfile can't :(
  • Hello, nope. I follow the instruction according to bwiernik, it did not rename it at all. Look like ZotFile haven't been updated for a while. I will submit the bug to ZotFile and hopefully they will be able to fix it
  • Yeah I'm in the same boat. Hopefully it'll get fixed in a future update, I'll submit a bug report also
Sign In or Register to comment.