Remove PDF files after removing them from Zotero (Zotfile)

If you remove an attachment (and clear the garbage bin) from Zotero it automatically removes them from the storage folder.

But when Zotfile moved that pdf, the pdf remains on that location.
Is there a way to remove these pdf's that are not present in Zotero anymore?

I would like to order my pdf's in subfolders per year and when I delete a reference it should be deleted from these subfolders.
  • By telling Zotflie to move your file attachments to another location, you are re-attaching them as links. Zotero does not manage files attached as links, so, by design, no, you cannot tell Zotero to delete linked file attachments.
  • Ok I understand, but this might be an interesting feature for the future. Because you get alot of clutter after adding and removing several references.
  • Yeah, that creates a bit of a nightmare when using linked attachments, doesn't it? @aurimas - do you know if this would be hard to implement technically?
  • Maybe a way to do it is to let zotfile make the moved files the attached file instead of just a linked file.
  • @Nils, for technical reasons, Zotero cannot add "attached" files without copying them to the Zotero data directory (i.e. how would Zotero be able to sync those files to another computer where the directory structure does not match?)

    @adamsmith, the issue with this is primarily conceptual. If you delete a link to file it should _not_ delete the target. It would be quite confusing if it did. Technically, this would be trivial, but how would a user distinguish between deleting just the link and deleting the link and the target?

    Honestly, I don't see a good reason to move all of your file attachments out of the Zotero data directory and organize them into folders based on metadata. This seems to me more like an attempt to hold onto old habits.
  • Honestly, I don't see a good reason to move all of your file attachments out of the Zotero data directory and organize them into folders based on metadata. This seems to me more like an attempt to hold onto old habits.
    yeah, but there's massive demand for it and we won't convince people otherwise.

    I was wondering if this is something one could pref with a significant warning attached. I understand, of course, the conceptual reasons why it doesn't make sense, but once people do use ZotFile for all the attachments (and that's very common as you know) then it's really unfortunate there's no way to actually manage the PDFs from there onwards.
  • it's really unfortunate there's no way to actually manage the PDFs from there onwards
    "Manage" here being specifically deleting linked files when they're deleted from Zotero? Or other things too?
  • haven't thought much about this (and I'm not using it) but yeah, I think it's just deleting, but I could be forgetting something. But I guess moving can still be handled by Zotfile where/when desired.
  • This could be implemented in ZotFile either on-the-fly as links are deleted, or as a feature to clean up orphaned files.
  • that probably makes most sense, right? This is really pretty much for people who use ZotFile.
  • This is something that has been raised and Joscha appears to be generally in favor of within Zotfile, but doesn't have time to implement.

    https://github.com/jlegewie/zotfile/issues/96
  • I'm the one who posed the question (changed username). It's good to know I'm not the only one. I'll just use zotfile to order my pdf's in subfolders when I need to share them with colleagues.

    That way I won't have any clutter when I delete references from zotero in the storage folder.
Sign In or Register to comment.