Files in storage not in sqlite?
Hello,
Basically I'm an idiot and I've made quite a mess of my storage directory. This has resulted in quite a few files which *are* in the storage folder (in 8-digit folders), but don't show up in my library. My hypothesis is that they're not listed in zotero.sqlite (or perhaps storage.sqlite). Is there any way to solve this that doesn't involve painstakingly re-adding the files individually?
Basically I'm an idiot and I've made quite a mess of my storage directory. This has resulted in quite a few files which *are* in the storage folder (in 8-digit folders), but don't show up in my library. My hypothesis is that they're not listed in zotero.sqlite (or perhaps storage.sqlite). Is there any way to solve this that doesn't involve painstakingly re-adding the files individually?
Upgrade Storage
https://github.com/SciImage/zotero-attachment-scanner
But since you say "My hypothesis is that they're not listed in zotero.sqlite" (where attachment locations are recorded), that suggests that the parent item might *not* have any attachment recorded at all. The Attachment Scanner can also tag items with no recorded attachment (#nosource).
If the files in question under Zotero\storage have *no* parent item (nor exist as standalone PDF entries in Zotero), that's a harder problem. Because by definition Zotero has no knowledge of the item or such "orphaned" attachments. To help find the orphaned files, you would need to generate a list in your OS of all PDFs (and any other attachment file types) under Zotero\storage, and then compare that list to a list of all known Zotero attachments. The latter list can be generated as described here:
https://forums.zotero.org/discussion/comment/440946/#Comment_440946
If you know the 8-char folder name where a PDF is located, you can check if Zotero has any knowledge of that location by entering the folder name in quick search for "All Fields & Tags".
Other suggestions to fix your problem might be more obvious if we knew *how* your library lost knowledge of some of its stored attachments.