Please add search by filename (concrete use case)

edited October 21, 2024
Use case I just encountered: I found a file via Spotlight in a Zotero storage folder and it is not named according to the author/title system. It's an audio clip where names are not mentioned and I don't recognize the voices. I know the file is an attachment, and I have the filename, but I will NEVER be able to find it in Zotero.

This is bound to happen again. It is inevitable that even the most meticulous researcher will fail to rename certain attachments according to author/title/year or other recognizable conventions.

Since file titles became separate from filenames, I (as far back as 9 months ago) and several other users asked for a way to search by filename.

Please fix this.
  • More arguments for this feature:
    @dstillman, you are wrong here:
    filename duplicates the metadata that's already shown in the parent row
    If there are several attachments to an item, only the first one will be renamed according to the metadata. All other files will retain their names from the file system, and those filenames in no way refer to the metadata.
  • FWIW, you can search by the alphanumeric string of the storage subfolder a file is in, assuming you're using Zotero storage. (I have no view on whether filename searches should be possible, but as long as they're not, this should cover a fair number of use cases discussed.
  • edited October 22, 2024
    @adamsmith Thanks--how do I search in Zotero for the alphanumeric string of the storage subfolder?
  • When you're looking at the file, note the folder name
    https://s3.amazonaws.com/zotero.org/images/forums/u2433/rznwyrnzk8s9qt3psxo6.png

    BAGFQDIT in this case.

    Then go to Zotero and in the quick search bar select "All Files and Tags", paste the folder name and Zotero will jump to the attachment in context
    https://s3.amazonaws.com/zotero.org/images/forums/u2433/xw5ghy2dhuwbtb6b40xr.png
  • @adamsmith Thanks, unfortunately this works in small collections, but it doesn't work in my entire library, where I would need to search for the missing file:
    https://s3.amazonaws.com/zotero.org/images/forums/u40/a9z9vranppzy7ntzjucv.png
    My library may be too big for this search--I have 89,923 items.
  • My understanding is that this should work as long as any search works -- can you try with a folder name that you know is in your library?

    Note that the storage folder does contain files in groups and search doesn't go across groups.
  • edited October 22, 2024
    Nope, this kind of search doesn't seem to work in large databases. This attachment is in the main Zotero library:
    https://s3.amazonaws.com/zotero.org/images/forums/u40/d942uktd4g30xd3kz9fo.png
    But it does not appear in search results:
    https://s3.amazonaws.com/zotero.org/images/forums/u40/weea4zi5huurcaz45x23.png
  • and you've made sure to set quick search to "All Fields and Tags"? It won't work in author, title, year
  • edited October 22, 2024
    Aha! That was the problem--Z switched back to "Author, Title.." and I didn't notice. With "All Fields and Tags" it actually searches for the filename as well as folder name, so my immediate problem is solved. Thank you so much!
  • If you can find filename with "All Fields and Tags" in the quick search window, filenames should be findable via "All Fields" option in the Advanced Search. That would only be consistent. It is not logical to be able to find filename in one place and not the other.
  • edited 28 days ago
    @dstillman as of February 22, 2024 "All Fields & Tags" search did not include filename:
    https://forums.zotero.org/discussion/comment/456281/#Comment_456281
    When was this feature added and was it announced on the forum? I must have missed that announcement. Thank you.
  • Since file titles became separate from filenames
    I'm begging you to stop misstating the change here. Attachments have always been separate from filenames, literally as long as Zotero has existed. Your previously using a plugin that changed the title (which you can still do) or manually running Rename File from Parent Metadata on files that had already been renamed doesn't change the fact that Zotero always set clean attachment titles that were different from filenames. That's why the previous behavior was a bug — if we wanted attachment titles to match the filename, we would've either never had titles or set them to match the filename when saving from the web. People can disagree about how things ideally would work, but as long as there are titles, the previous behavior was inconsistent and illogical and needed to be addressed one way or another.
    If there are several attachments to an item, only the first one will be renamed according to the metadata. All other files will retain their names from the file system, and those filenames in no way refer to the metadata.
    Yes, and that's totally irrelevant, because those also get titles that match the filename when you drag them into Zotero, and if you manually run Rename File from Parent Metadata on those, their titles are still changed to match the renamed file basename. I'm talking about the first attachment (which is also all that most Zotero users have).
    With "All Fields and Tags" it actually searches for the filename as well as folder name
    No it doesn't? Not sure why you think this. You can match the storage folder name (the 8-character string) that way, as adamsmith explains. Matching filenames via search would be good, and we have an open ticket for that, but there's no new problem here that necessitates that, since it's always been possible to have a file in Zotero with a filename that didn't match the title, a filename that appeared multiple times, etc. That's why the item key hack exists.
Sign In or Register to comment.