retorquere / zotero-storage-scanner

A Zotero plugin to remove the broken & duplicate attachment link of the bibliography
530 stars 19 forks source link

Find orphan files #9

Open melsophos opened 6 years ago

melsophos commented 6 years ago

Do you think it would be possible to search also for orphan files (file in storage/ not attached to any document)? Sometimes I end up with such files for various reasons (bad synchronisation between computers, misuse of extensions, etc.). I guess this would involve a quite different process as the ones you already for finding duplicates and missing attachments so I don't know how easy it is to add this feature. But this would nicely complement the two others. For the output I see two possibilities, either adding "fake" entries with a tag and with the document attached, or writing a log file somewhere.

retorquere commented 6 years ago

I'd have to walk the file system and compare to the database. It's not inherently difficult, but for the existing detection I can use the Zotero implementation; I just automate existing functionality. I'll think about it, but no ETAs.

melsophos commented 6 years ago

This would be very nice, thank you. In any case, there is no hurry, I think this is a general feature that Zotero should have, but it is not critical.

dmi3kno commented 2 years ago

Very desirable feature. I am using this plugin together with ZotFile, which is linked and synchronized to cloud storage. Finding orphans has real $$ implication.

May I offer an idea: add all files as additional entries not tied to any items, perhaps even under its own collection and then remove one by one, if matched to one of the existing items in collection. May be expensive, but guarantees a separate collection of "orphans" and reduces to one filesystem-scanning task and multiple Zotero-matching tasks.