Can't zotfile delete attachment?

When I delete a reference, I want to delete the index listed in zotero, and delete the attachment as well to release some space for new attachment. However, when a reference is "renamed" by zotfile, the reference attachment comes to a link. Then, when a delete a reference, the attachment is still there. So I think there must so many useless attachement in my hard disk now.
So, the question is, how to deal with it? Did I set some thing wrong?
  • Zotero doesn't delete linked files, only stored files, since it doesn't have any way of knowing if you're using the file outside of Zotero. If you want Zotero to manage files for you, you need to use stored files.
  • Well, I think this should be the function of zotfile.
  • It can add attachment, it should delete the attachment as well.
  • ZotFile makes it easier to use linked-file attachments, but linked-file attachments are just a standard part of Zotero. Deletion is handled by Zotero, not ZotFile.
  • What I mean is there must be a connection between the links and the linked-file attachments. This link is made by zotfile and should be recognized by zotfile. So if the link is deleted, zotfile should tell that and delete the corresponding attachment. So, what zotero deleted is only the index and the link (this storaged in the storage folder of zotero), but the attachement should be cleared out as well, this should be done by zorfile. Otherwise, the useless attachments will get more and more. Apparently, zotfile has no this function right now.
  • I think you're still misunderstanding the technical part of this. There's absolutely no difference between a linked file that you create manually in Zotero and one that ZotFile creates for you. ZotFile doesn't keep track of those, and it would require major changes to do so.

    Any plugin, ZotFile included, could in theory alter Zotero's deletion behavior for linked-file attachments to delete the associated files, but that doesn't really have much to do with ZotFile's current functionality, which is simply to make it easier to create the same linked-file attachments that you can create yourself.

    In any case, that would be a feature request for the ZotFile developer.
  • Whatever I am thinking, the result is that zotfile moved the attachment from the fold of "stotage" to another, and then the attachment can't be deleted if you delete a reference in zotero. This is not zotero's fualt, because the attachment has been moved, and this is not zotfile’s fualt, because zotfile only to change the location of a attachment and make it easier to creat the link.
    Then, if you want to delete a reference, you should delete the attachment first. Or, just change to use another?
  • @liuhaijin I think you just have to accept that linked files will not be deleted by Zotero currently. For pros and cons, see e.g.:

    You could consider using stored files instead:

    As a workaround, you could convert linked files to stored files prior to moving ítems to trash:

    1. "File"/"Tools" -> "Manage Attachments" -> "Convert Linked Files to Stored Files"

    2. "Move Item(s) to Trash"
  • @qqbb Thank you. This is a way. I have used zotero for 5 years and this is the only problem I want to say. Because my reference folder is getting larger and larger. I agree with that zotero has no defect on this point, only zotfile should improve the performance. However, zotfile may be not developed by zotero.
    I can reorganize the reference with the method you provided. In case of some other people raised this problem, it should be resolved sooner or later.
    Thank you again.
  • edited November 29, 2019
    Dan, how about having a user-preference setting that tells Zotero to delete (or not) the attachment, too, when the parent item is deleted?
Sign In or Register to comment.