Need help recovering a mangled project (binder index?)

Ok, I managed to finally recover things. It wasn’t really easy or clean, and I’m sure I didn’t do it the way Scrivener’s desinger would have. I only stopped at what worked enough to recovery the binder with all of my previously missing scenes. From there I will be able to import (as suggested in this thread) into a new project and count my blessings.

[size=200]THIS REPAIR REQUIRES PROGRAMMING SOFTWARE TOOLS AND IS NOT RECOMMENDED FOR THOSE THAT DO NOT UNDERSTAND THE XML FORMAT.[/size]

Seriously, the staff here can vouch for this, you can seriously destroy your data in a hurry here if you mess with things you don’t understand. My efforts are tempered by my understanding the structure of XML and programming to a degree that allows me to understand what I’m looking at. If you can’t decipher ‘code’ then this sort of fix will be worse that doing nothing.

I opened the project.scriv package in Finder and then loaded from there both the project.scrivx and binder.mob files into my IDE (PHPStorm), then I ran the IDE’s difference engine on the pair. As expected there were 20 detected differences in the files. So I started looking at those differences and judged the project container (scrivx) was correct but the mobile binder stack (binder.mob) had the correct Binder data. So I started selectively updating binder.mob with complete XML phrases (from the opening tag to the closing tag with any enclosed childern tags) from the project.scrivx file.

After making ten updates, I did not find anything else that would seem to effect function, and saved the updated binder.mob file in a new location with a different name. I then copied the project.scrivx file out of the scriv package and inserted my modified binder.mob file and renaming it to project.scrivx.

Loading the project in Scrivener3 produced a popup with a sync conflicts detection, but after that process completed I had all my data back where I was hoping to find it. I still have a number of items in the conflicts folder, but I can deal with that far easier that trying to reorder and rename my scenes by contents. Figuring out what to do in order to fix this took far longer than the few minutes I spent in PHPStorm actually fixing it.