How a Scrivener Project is Structured

I thought it might be useful to enumerate a little on how a Scrivener project is structured.

The Tutorial project that is part of Scrivener is just like any other Scrivener project you will create.

A complete Scrivener project is stored within a .scriv folder. This is a standard folder with simply a .scriv extension.

Within the .scriv folder is a project.scrivx file - it’s the file with the Scrivener icon. Double clicking the .scrivx file will launch your project within Scrivener. However, the .scrivx file is NOT your entire project, it is simply an XML text file that stores important information about your project and how to find all the elements of your project within the .scriv project folder hierarchy. For example, the .scrivx stores project items such as: All binder items, their titles, labels, status’, include in compile settings, creation and modified dates, target words, the type of file and extension, keyword info, print settings, search settings etc…

So, if you want to email, dropbox, copy to a USB stick, or share your project you MUST copy the entire .scriv folder. This folder is your project, the .scrivx is only part of your project - albeit a vital piece. Fortunately, windows makes this very simple to do, you simply right -click on the .scriv folder and select Send To -> Compressed (zipped) folder as shown in the following picture:
1.png
Alternatively, you can achieve the same thing from within Scrivener File -> Backup Project To… Make sure you check the ‘Backup As Zip File’ option.
2.JPG

Let’s take a look at this graphically using the Tutorial project as an example:

Attached also is the full project.scrivx file in PDF for those interested.
Project Data.PDF (27 KB)

So, say I put a copy on my USB stick and worked on the project on my netbook. When I want to put it back on my main desktop, Is it safe to just copy/paste the netbook version from my USB and overwrite the folder on the desktop? Don’t want to accidentally corrupt anything.

I wouldn’t advise doing that. I can’t recall how Windows handles copying a folder & it’s contents to another folder with the same name, but here are some things that could go wrong (these are issues I remember coming across in various operating systems):

o Merge the contents: This includes restoring documents that you intended to delete in one copy, and generally confusing Scrivener (if it wasn’t in the binder of one version, Scriv. might not know where to stick the new file).

o Accidentally adding the entire contents of your project as a sub-folder of the scrivener project. So you’d have a copy of your book (and other project files) within your book.

o Copy process is interrupted mid-copy due to some kind of file-locking issue, so that your “target” project is part-way updated with newer documents.

o Best case scenario: The old folder is deleted by Windows before copying the newer folder to the same place, which is probably the more advisable way to go… Actually, rename your old version with the current date, don’t delete it. Your time is more valuable that your hard drive space.

Second that. Whenever I move a Scrivener project from one computer to another, I look at it as an opportunity to create a new time-stamped backup. I take it a step further and zip everything that is a backup. Just right-click and Send To/Compressed (zip) Folder; date it; delete the original. This way both computers end up with non-identical sequences of backups and they are all zipped which means they save space and it’s readily apparent which file is the one I’m actually working on, and which one is a backup, but the .zip extension.

I just store mine in my Dropbox folder. Or is that not a good idea?

1 Like

Hi.
New to Scrivener & the forum. I just lost my work after a compile, but had made two briefcase copies. Double-clicking on project file will start Scrivener, but all documents are missing. Binder titles are intact. I only had around 1500 wds, but will write in LibreOffice until I can figure this out.

Hi VictorJ,

Apologies for the delay in responding; I missed seeing this. I’m so sorry to hear about your lost work! Firs thing to check is that the files really are missing from the project: open the project’s .scriv folder in Windows Explorer and navigate into Files\Docs. There should be an RTF file there for each document in your binder. You can also try using the Windows search tool to look for some unique words or phrases from your missing text–in most cases, that will find any files that might be lingering in the wrong place (or in another version of the project you didn’t realize you had).

If you have a chance, answers to the following questions may help Lee track down the problem.

1.) What is your operating system (e.g. French Windows 7 pro 32bit)

2.) Is your Windows user account standard or administrator?

3.) Where are you saving your Scrivener project file? (e.g. to your Documents folder, to a thumb drive, on a shared network, etc.)

4.) What format is the drive you’re saving the project to? (NTFS, fat32, etc)

5.) What is your ‘Save after period of inactivity’ set to in Tools>Options…>General

6.) Do you have any backup or sync services running while working in Scrivener?

7.) and as much relevant information as you can so that Lee can reproduce the same situation as closely as possible (about how many documents did you have in the project/how may are lost, are documents lost that you hadn’t edited the last time you opened the project, did you experience any crashes or odd behavior, etc.)

With that last one, do you leave your project open for long periods (e.g. overnight) so that your computer goes to sleep while the project is open? There was an older bug that I think may have been partially related to the computer going into hibernation while a project was open, although that wasn’t the same as the issue you’re seeing here; still good to know, though. Also, when did you notice the documents had disappeared? Was it during the same session–e.g., you had the project open, you compiled, and then you saw that the documents were gone from the project–or did you close the project while everything seemed fine and then the next time you opened, documents were missing?

Again, I’m so sorry that you’ve lost work and I hope we’ll be able to get to the bottom of this quickly.

Just for reference, for anyone who is interested:

I have a folder within my Dropbox called “Writing Projects.” All of my Scrivener projects are in there, and when I make a new one, I create directly to that directory. Thus far (a couple weeks), everything has synced perfectly - no missing files, no data corruption.

Hope this is helpful information.

Cheers.

Russ

2 Likes

Dropbox sometimes creates 0 byte files when the synchronization is not finished.

I do have now another backup program over main dropbox computer.

A question related to the original post. I am running Scrivener, mostly, on Mac and recently on Windows. I use a thumb drive to switch between computers. When I go to open the project in Windows, I open the folder and locate the project.scrivx file, double click and am up and running. In the Mac OS, I double click on the icon for my project and there it is. I understand the structure is the same on both machines.

So, I had a project I started in Windows and I wanted to work on it on the Mac. In the finder, double clicking on the folder got me nothing but an open folder. Fortunately, I understood the structure and double clicked on the project.scrivx file. But when I closed Scrivener, that file had now become a folder that had, at least the semblance of the same structure. I wound up deleting the newly created sub-folders. Then I went to the top folder and added the scriv extension. Mac OS set the folder icon to the project icon and it worked as expected from there.

My question, then, is there a better procedure when taking a project back and forth between OS’s?

Thanks, John

Projects on Windows are created with the .scriv extension on the folder, and that shouldn’t disappear when copying the whole folder to a Mac. Most likely the extension was deleted at some point on Windows prior to transferring, but since there’s not the same package format on the Windows OS, the project still opens even without the .scriv extension on the folder. You do want to keep that extension there though, so if you see this just correct it the way you did on the Mac, adding the .scriv to the folder name.

If you are having trouble with the folder copying properly between computers, try zipping it before moving it, then extracting it on the other end. Just note the differences in how the OSes handle archives by default: on Mac, double-clicking a zip folder typically extracts the contents, so they’re ready for you to work in. On Windows, double-clicking just opens the zip folder for viewing, but the contents are still read-only; you need to take another step of dragging the .scriv folder out of the zip folder or running the “Extract” tool to create a copy of the project that can be edited.