Deleting files on disk when removing attachments
dstillman
Zotero Team
This discussion was created from comments split from: Is there a way to delete attached files (e.g. PDFs) within Zotero?.
Upgrade Storage
To confirm, I just checked all the linked PDFs in my Zotero Bin/trash that I had deleted, and they're all gone from my hard drive, as expected (ie right click Show File returns 'The attached file could not be found at the following path ...') [note that this is different to normal Zotero behaviour with files in the Bin, which remain on desk until the Bin is emptied]. I noted that in some cases I had just deleted a single PDF of several under an item, deliberately leaving the item itself with snapshots and other PDFs. However the listing in the Bin shows the whole item, but only the PDF I had selected had actually been deleted (as intended) while everything else remains.
First, Zotero has created single HTML files for web snapshots for a couple years now.
And then this thread is specifically about linked files. The only folders that Zotero creates are for stored files within the Zotero data directory, and Zotero manages those folders automatically, including deleting them when the attachment is emptied from the Zotero trash.
If you're talking about saved webpages with multiple files created outside of Zotero (e.g., with your browser) and added as linked files, then OK, but 1) Zotero isn't creating those folders and 2) you'll get better results using Zotero's own snapshot saving.
If you're talking about folders elsewhere on your computer, with an HTML file added as a linked file in Zotero, Zotero didn't create those. If those are what you're trying to delete, you'll need the plugin, because Zotero doesn't delete linked files, but we can't help with that.
I'm just responding to your "Zotero creates those folders" comment and making sure you actually understand that folders within 'storage' are handled by Zotero.
Yes, the files I am referring to live in the storage folder, with multiple files. But so how do I delete multiple folders for multiple Zotero items in batch? When I select and right click those Zotero items, there is no option to "Remove Attachments" or similar.
As I've said, Zotero manages the folders in 'storage' for you. When you empty the trash, the associated files and folders for purged attachments are removed automatically. Nothing is deleted from disk while the attachments are just in the Zotero trash.
If you're just asking how to select attachment items in Zotero in batch, you can do a search for "snapshot" in All Fields & Tags mode or try to create a saved search that matches the attachments you want to delete, do a Select All, and move the attachments to the trash, and then empty the trash.
None of this has anything to do with the folders on disk, which, again, Zotero manages for you. (You should post to or close that GitHub thread, because the developer also misunderstood what you were asking.)