pdf attachment database
I'm really struggling with Zotero understanding where my attachments are. I want to use it on several computers that share a network folder for attachments. First I put the data folder on the shared drive (against recommendations I know) and it was just too slow and unpredictable so I moved attachments to links and pointed it to a flat shared folder (network folder using zotfile addon). Zotero didn't update the location and can't find any of my files. When I look in the SQLite database there is a table itemAttachments and the path starts with either 'storage:' or 'attachments:' and then the filename (e.g. attachments:filename.pdf). I can't manually change from 'storage:' to 'attachments:' without corrupting something so I'm asking how to manually edit the database to tell Zotero where my files are since it's having such a hard time doing so. One guide mentioned once you correct one file location using locate... when prompted it will automatically apply to others but that is not the case for me.
So it's likely that you set a LABD at some point and now the linked PDFs have been moved somewhere else, but the LABD setting has not been updated. If so, Zotero is looking in the wrong place for them. Set the LABD to where they are now.
Secondly, while you obviously have some linked files (the ones that *already* have the "attachments:" prefix in the database), the specific problem you describe now seems to be with files that are in *local* Zotero storage (or at least Zotero thinks that is where they are) ...
If a PDF's file name has the "storage:" prefix in the database at the time Zotero says it can't find it, then it's not a linked file at that stage. Zotero thinks that file is in local Zotero storage (not in Zotfile's Custom Location). If that's what you're dealing with now, forget about the LABD setting just for now - that only concerns linked files (and only where Zotero *looks* for them); and any issues with linked files would be separate.
Zotero looks for *local* stored PDFs at the location shown under Edit\Preferences\Advanced\Files&Folders\Data Directory location. Click on the Data Directory location button there to show that location, just to confirm that where Zotero thinks it is and where you think it is are really the same thing. That is the folder where Zotero stores the sqlite database, and that folder has child folders that include the storage\ folder hierarchy, under which all locally stored PDFs are stored in arbitrarily-named folders.
When Zotero shows the message that it can't find a *local* PDF (one with the "storage:" prefix), the message tells you exactly where it is looking for the file. What is that location ? It should correspond to one of the arbitrarily-named folders under Zotero\storage above. Is that PDF file you are looking for in that folder ? If not, where it is ? (and do you know how it got there ?). And is its name exactly the filename that Zotero says it's looking for ?
Other comments ...
The messy duplication of files when you try to resolve the above situation is indeed likely due to different renaming rules in place for Zotero and Zotfile; but that is probably secondary to the less-than-ideal way you are trying to resolve things. Hopefully a better way will become apparent once the origin and nature of the current problems is clearer.
You mention Zotero "moving" PDFs from the LABD. Zotero (not Zotfile) should only be moving PDF files if you use Tools\Manage Attachments\Convert Linked Files to Stored Files. You didn't mention using that, but that would be all that is necessary to move a linked PDF back into local Zotero storage.
Zotero should always display the link symbol next to PDFs that are linked rather than locally stored. And vice-versa: there should be no link symbol next to PDFs that are in local Zotero storage. Those symbols should match exactly whether a PDF's entry in the database has the storage: or attachments: prefix. Those prefixes should change in the live database when Zotero moves a linked file back to local storage and when Zotfile moves a local file to its linked file location.
Do you have good backups of the Zotero database folder and local storage folder hierarchy ? It's not clear that you might need to roll back to a previous version, but it's always good to know that you can.