unlinked items & other questions
Question 1 : would I do any damage to the zot datadict if I manually delete items found under the datadict path but are not found in zot?
For example. By searching on the OS level for a filename of a PDF I found three instances.
dataDict\storage\7QQHRSGE\Diehl et al. - 2004 - Agency and communion attributes in adults' spontan.pdf
dataDict\storage\HVZZZIHX\Diehl et al. - 2004 - Agency and communion attributes in adults' spontan.pdf
dataDict\storage\UM6ENIJ3\Diehl et al. - 2004 - Agency and communion attributes in adults' spontan.pdf
However, when searching in zot I only found one of the three when searching by author "Diehl"
Could I manually delete the other two using an OS delete without damaging the datadict/sqlite interconnection?
QUESTION 2 : Is there a way to find all of these files using zot? That is, other instances of where there is an OS level file under the datadict path, but zot/sqlite is unaware of it.
QUESTION 3 : Is there a way to search for unindexed attachments? I have added "Item Type" as a column, and can sort by that to find attachments, but I see no way to filter that down to only unindexed attachments. There is the "notIndexed" virtual collection (saved search), but many of the attachments it finds are indeed indexed.
QUESTION 4 : If an item is not indexed and it has no parent item, then can a zot search find it at all, except by filename?
For example. By searching on the OS level for a filename of a PDF I found three instances.
dataDict\storage\7QQHRSGE\Diehl et al. - 2004 - Agency and communion attributes in adults' spontan.pdf
dataDict\storage\HVZZZIHX\Diehl et al. - 2004 - Agency and communion attributes in adults' spontan.pdf
dataDict\storage\UM6ENIJ3\Diehl et al. - 2004 - Agency and communion attributes in adults' spontan.pdf
However, when searching in zot I only found one of the three when searching by author "Diehl"
Could I manually delete the other two using an OS delete without damaging the datadict/sqlite interconnection?
QUESTION 2 : Is there a way to find all of these files using zot? That is, other instances of where there is an OS level file under the datadict path, but zot/sqlite is unaware of it.
QUESTION 3 : Is there a way to search for unindexed attachments? I have added "Item Type" as a column, and can sort by that to find attachments, but I see no way to filter that down to only unindexed attachments. There is the "notIndexed" virtual collection (saved search), but many of the attachments it finds are indeed indexed.
QUESTION 4 : If an item is not indexed and it has no parent item, then can a zot search find it at all, except by filename?
There are several ways to get a simple list of what attachments Zotero DOES know about (that is, are in its database).
The Zutilo add-on can copy a list to the clipboard of ALL attachment files - for the SELECTED items - that Zotero knows about ('Copy attachment paths'). That list contains not just PDFs, and not just locally stored files.
If you want to know which attachment PDF files in your local storage folder ARE in Zotero's database, this code run under Tools\Developer\Run Javascript should show you that list. As always, there may be a simpler or more elegant way of doing this. ;)
var sql = "SELECT (? || '\\storage\\' || key || REPLACE(path,'storage:','\\')) AS filepathnames FROM itemAttachments JOIN items USING (itemID) WHERE libraryID=1 AND path IS NOT NULL AND path LIKE ? ORDER BY filepathnames";
var filepathnames = await Zotero.DB.columnQueryAsync(
sql,
[
Zotero.DataDirectory.dir,
'storage:%.pdf'
]
);
return filepathnames.join('\n');