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?
So, the question is, how to deal with it? Did I set some thing wrong?
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.
Then, if you want to delete a reference, you should delete the attachment first. Or, just change to use another?
https://forums.zotero.org/discussion/79899/deleting-removing-item-should-remove-ask-to-remove-any-attachments
You could consider using stored files instead:
https://forums.zotero.org/discussion/79437/pros-and-cons-of-attach-link-to-file-vs-attach-stored-copy-of-file
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"
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.
https://forums.zotero.org/discussion/comment/364101/#Comment_364101
Then I can periodically filter for that Tag, bulk "Convert Linked Files to Stored Files", then select all and Move to Trash, and empty trash.
This seems pretty smooth and doesn't need to use any fancy scripts or anything.
I coded a JS to clean the customized reference fold after Zotfile is installed, https://github.com/redleafnew/zotero-javascripts/blob/main/4delete the attachment files after the items have been removed when zotfile was installed.js
when batch deleting needed, https://github.com/redleafnew/zotero-javascripts/blob/main/5delete the addachments when the items were removed.js could be used.
An context menu add-on has been developed, but function not well.
I am trying to find this type of function, but not available.