Renaming all Files with Parent Metadata
Zotero has this context click option to 'Rename File from Parent Metadata' which renames PDFs (or whatever) to something useful which pertains to the contents. It would take a very long time for me to manually go through every PDF in my collection to rename it with this function so I was hoping there might be some way to get Zotero to do this automatically to every file (appending the name with a number to avoid conflicts if necessary).
You can do this for multiple items by doing a search that matches multiple attachments (e.g., a saved search with Attachment File Type is PDF) and then using Select All (which will select only the matching items) and the context menu option.
If so, how exactly are you adding these files?
Edit: Sorry, misread. Yes, that's right — there's no need to change the attachment title unless you want it to display something different. (E.g., some people note whether it's an annotated version of the PDF.)
Thanks @rooots for the tips on the hidden preferences described in https://www.zotero.org/support/preferences/hidden_preferences.
My chief concern as a Linux user is **not getting** spaces within file names, for this complicates the file handling at the command line and other inconveniences. I have thus modified the string in the hidden preferences into something like {%c-}{%y} and so forth.
The problem is that, if the item has been produced by Stanley and Laurel, the placeholder %c will give the string "Stanley and Laurel" with whitespaces, so defeating my purpose.
Question one: is there a way to have a finer control on the syntax of %c?
Question two: is there a full list of the possible placeholders? For example, I would want to include the journal title instead of the article title.
If these features are not present or accessible, please add to the wishlist.
For more fine-grained control on file naming, use the Zotfile add-on (zotfile.com)
The built in renaming just has the cty options and they can't be customized beyond the character limit for titles noted in the documentation.
Regarding to Zotfile there are a couple of problems. One is that it does not have the instruction *Rename File from Parent Metadata*, so it is not automatic to do it (or at least I didn't find how to do it). The other problem is that it seems that it will not have a very long future (https://github.com/jlegewie/zotfile/issues/522#issuecomment-806630585).
Even modern OS support spaces, it is quite convoluted to manipulate them (tab completion is not useful when many files start equal, as is the case of papers by the same author). On the other hand, the hard or soft of reading filenames with let's say, underscores is just individual's opinion. Moreover, thanks to Zotero, we do not have to focus on searching for pdf filenames, but on Zotero database.
So it would be great of having an option, as in Zotfile, for *Replace blanks*
"... and then using Select All (which will select only the matching items) and the context menu option."
The context menu doesn't appear in the advanced search box, neither on MAC or Windows. Is this something that was lost along the way?
is still available in Zotero 7 as it has always been. ZotFile is not compatible with Zotero 7, although Zotmoov duplicates most of its functionality.
"Rename File from Parent Metadata" is still available. But I guess multiple item renaming is not a thing anymore.
Automatic renaming is nice, but it may not be enough. Because many items need to be edited or corrected later. For this reason, for example, it would be nice to be able to completely rename the items in the sub-collection I created in preparation for the courses.
Regards,
A future version will offer continuous renaming, so files will be renamed as you make manual changes to the metadata.