Renaming files based on Zotero collection structure (Zotero 7 post-Zotfile)

edited 11 days ago
Hi all, I have done a bit of searching and playing around with attanger + Zotmoov but have not yet figured out how to replicate a feature of Zotfile that really helped with my overall workflow: the ability to rename files added to a Zotero item based on its containing collections + subcollections. For example, if an article used to sit in the "Dissertation Chapter 1" folder of "000 Inbox," I used to be able to automatically rename it to:

2017 - Author - Title of the article - 000 InboxDissertation Chapter 1.md

Do any of these Zotfile replacements do such a thing? Or is there any way to replicate this functionality in Zotero 7? I know that the file name itself is pretty ungainly, but I was able to use those keywords to do some really nice categorization in DevonThink...

Will be grateful for any help here!
  • Note that Zotero collections and sub-collections are *not* directories, they really behave more like tags:

    https://www.zotero.org/support/collections_and_tags

    I suppose it would be possible to do what you want nonetheless, but I think the the filenames would become very complex very quickly...
    There are several posts about DevonThink on this forum, perhaps one of them provides a better approach to access Zotero metadata from DevonThink?
  • edited 11 days ago
    Thanks. As I said, I'm not worried about the filenames becoming complex.

    Do you have a suggestion about how it would be possible to re-name a file based on containing collections?

    I'll update the post to reflect that the correct terminology is 'collections' not 'directory'.

    For now, I don't think DevonThink needs to access any metadata about my items, it just indexes the files, so I am trying to solve this on the Zotero side first.
  • edited 11 days ago
    The plugins that replace Zotfile - Zotmoov and Attanger - now leave linked file renaming to Zotero's enhanced renaming scheme. However there are some things that Zotfile's scheme did that Zotero's doesn't (eg diacritic removal).

    From your post I was prepared to assume that using "collection name" was one of those ... but I can't see any indication in the the Zotfile documentation (linked below) that it actually supported "collection name" as part of file names. It *did* support that for naming the *folder* into which it placed the linked PDF file. What was the file renaming format string that you used in Zotfile ?
    https://zotfile.com/index.html#renaming-rules
  • @tim820 Thanks, yes, I would have used the "%c collection path (only for sub-folders, not file names)" wildcard.
  • edited 11 days ago
    But doesn't that mean what it says ... that it worked for naming folders but not files ? Your example was of a file renamed that way (according to its collection name).

    Zotmoov and Attanger do support the folder naming feature from Zotfile.
  • I think the description in the Zotfile docs is a little unclear! Let me paste in full description: "%c collection path (only for sub-folders, not file names). When item is in multiple collections, user can choose between the different collections."

    Does that clear things up a bit? I think it is fair to say that the %c wildcard dealt with collections within Zotero, not folder paths on the hard drive, as the example I gave above does demonstrate.

    As far as I can tell, Attanger's file naming conventions follow the guidelines at https://www.zotero.org/support/file_renaming, which does not allow for collections.

    I'm not quite sure what you mean about the "folder naming feature," sorry!
  • %c in Zotfile set the *folder* name (in which it placed the linked PDF) to the same name as the collection to which the user saved it. It did not do that for the filename (unless that was a bug; because the docs explicitly said "only for sub-folders, not file names").

    Zotmoov does the same thing as Zotfile did (that is, the folder name, not the filename).
    https://github.com/wileyyugioh/zotmoov/blob/master/docs/SETTINGS_INFO.md#automatically-movecopy-files-to-subdirectory

    Attanger does the same thing as Zotfile did ... "Subfolder:" in its Setings.
  • I see! Strange, because I was definitely renaming the file names, as some of the extremely jumbled messes of filenames in my database can attest :]

    I guess it's kind of a moot point anyway. I see what you mean about the folder renaming, though I am not sure that will really work so well for me.

    Maybe I'm out of luck for the moment.
Sign In or Register to comment.