Footnotes and Settings Lost after restoring from cloud backup

Hello everyone. I’m hoping someone can help me recover my settings, comments, and footnotes for a book that’s been six years in the making. Yesterday my MacBook was running very sluggishly, and so I decided to wipe the drive and start again. Everything was backed up to my external drive, and also to Google Drive. What I didn’t know was that my external drive had on this same day given up the ghost, and that Google Drive messes up Scrivener files big time (this should really be a bold, all caps warning all over L&L’s website…I nearly lost six years of work!). I managed to retrieve the files from Drive by downloading each file one by one, using terminal to convert them back from docx (which is what Drive converts them to) to rtf files, and making sure everything was nested properly. Viola! my book was back.

But the footnotes and comments are all gone, and the styles I’d set for the text were no longer there. The comments files (.comments) are all in the Docs folder, but whatever it is that tells them to appear in Scrivener is apparently screwed up somehow. Anyone have advice as to how to get that information back? It would save me a couple weeks of very tedious work if so, and would be much, much appreciated.



Before you start, make a backup of the Scrivener project. That way you’ll at least keep what you have if something goes wrong.

In the Google Docs version of the project, locate the Comments files. Use the Download As -> RTF option, and download them to a convenient location. Use Finder to change the extension back to .comments.

Also in the Google Docs version of the project, locate the .scrivx file. Download that as plain text, and save to the same location as the comments files.

Open the .scrivx file you just downloaded in TextEdit. It’s raw XML, so don’t worry that it isn’t terribly human readable.

CLOSE SCRIVENER. We’re about to mess with the project behind its back, which is potentially dangerous.

Locate the new project in Finder, right-click, and select the option to Show Package Contents. Locate the .scrivx file, make a duplicate, and drag the duplicate out to another location. Open the duplicate in TextEdit. (You’ll need to use the Open With command to keep OS X from trying to open it in Scrivener.) Then, browse to the project’s Files/Docs subfolder.

Open another Finder window, and browse to the folder where you put the comment files from Google Docs.

You now have two TextEdit windows, with two different .scrivx files. Select all of the text in one of them and change it to a different color so that you can tell them apart.

A bit of explanation: When Scrivener imports or creates a file, it assigns a number to it. 54.rtf. 32.pdf. And so on. All secondary documents associated with the main file will carry the same number. 54.comments, for example, or 32_synopsis.txt. The scrivx file is a master index that ties the numbers to the human readable names that you see in the Binder. If you transfer a file from one project to another, it will get a new name in the new project. What has probably happened here is that the comments files no longer have the same number as their associated RTF document, and so Scrivener doesn’t know how to connect them. So, here’s what to do.

Look at the comments files that you downloaded from Google Docs. Pick one, let’s say it’s called 56.comments. Open it in TextEdit (again, you’ll need Open With), but don’t change anything. In the .scrivx file for the backup of the project (the one you downloaded from Google Docs), search for the phrase: ID=“56”

You’ll find a chunk of code that starts 'BinderItem ID=“56” ’ and continues for a couple of lines. Copy the text after ‘Title’ in that block.

Switch to the .scrivx file for the new project, and search for the title you just copied. That will tell you the item’s new ID number in the new project. (42, let’s say.) If 56.comments is present in the new project, open it in TextEdit to make sure it has the same contents as the one from Google Docs.

Close both comment files in TextEdit. Either rename the one currently residing in the new project to 42.comments, or rename the one from Google Docs and drag it over.

Open Scrivener, use the Title to find the appropriate file, and confirm that the comments re-connected correctly. Assuming they did, close Scrivener and repeat for the rest of the files.

If you have a lot of comments, you may encounter collisions: 42.comments already exists, but it has comments for a file other than 42.rtf. You can use temporary names as needed to “store” these files until you find their parents. I’d suggest something like a_42.comments: a real Scrivener comments file will never have a letter in the name, but you’ll still be able to use the item ID number to find it.


Just for future reference (yes I know, the words “horse” stable door" and “bolted” are coming to mind) - it’s quite possible that the reason your Mac was acting sluggish was precisely because the external drive had failed; disconnecting the drive to see if things improved, then re-connecting to see if it was even recognised, would be a better way to go about things than wipe your Mac’s HD.

In future:

  1. Restart and check.
  2. Switch off, boot up and check.
  3. Disconnect peripherals one by one, and check.
    Restoring the OS and wiping your HD should be your very last resort.

I’m in a similar situation - I had no idea that google drive messed up the comments. My laptop died and I haven’t yet been able to find out whether I can retrieve stuff off the hard drive. I thought I was fine as I had been backing up on google drive, but apparently not.

The steps outlined above don’t work, as I have failed at the first hurdle - there is no option to ‘Download as’ on my google drive, only to Download, which of course downloads as an .xml file. So I am no further forward. Can anyone help with this?

You can force TextEdit to open an XML file. Right-click and choose the Open With option.

Note that if you are using Scrivener 3, the project format is different and these instructions won’t work.


Update - I had already downloaded the whole project and realised that I can just change the filename for each xml file from e.g. 52.comments.xml to 52.comments and this seemed to fix the problem with the comments not showing up. I now have to do this for 250-odd files, but it seems to work. The right comment appears in the right place in the scene where it was originally.

I am however wondering - am I likely to discover down the line that there are other problems with my project that the above fix didn’t sort out? It all looks fine, but maybe there are gremlins hiding in there I haven’t found yet.

I didn’t seem to have the problem with all my files being converted to .docx - they were all still as .rtf so I don’t think there are any other problems with file extensions

[By the way I’m working on Windows, not a Mac - found this thread via a google search]

You should be okay. Scrivener’s project format is pretty open, in that it’s easy to see what’s there (or not). Make a backup, don’t let Google Drive mess with your projects, and you should be fine.