How a Scrivener Project is Structured

User avatar
Posts: 1030
Joined: Tue Sep 21, 2010 5:25 pm
Platform: Windows
Location: Sydney

Sun Nov 21, 2010 3:06 am Post

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 (21.76 KiB) Viewed 42486 times

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 (23.32 KiB) Viewed 42486 times

Let's take a look at this graphically using the Tutorial project as an example:
ScrivenerProjectStructure.png (747.57 KiB) Viewed 42529 times

Attached also is the full project.scrivx file in PDF for those interested.
Project Data.PDF
(26.97 KiB) Downloaded 1269 times

Posts: 73
Joined: Sun Nov 14, 2010 5:13 pm
Platform: Windows

Mon Jan 31, 2011 1:47 pm Post

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.
Western Redemption in Dystopian America
Read The Wanderer and the New West by Adam Bender

User avatar
Posts: 3075
Joined: Mon Nov 09, 2009 10:06 pm
Platform: Mac
Location: St. Louis, MO, USA

Mon Jan 31, 2011 6:57 pm Post

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.
Often wrong, rarely in doubt.
Time for a change... I'm now rdale; same dog-avatar, same dog... channel?

User avatar
Posts: 24638
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza

Mon Jan 31, 2011 7:18 pm Post

robertdguthrie wrote: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.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

Posts: 147
Joined: Fri Dec 10, 2010 2:32 am
Platform: Linux + Windows

Wed Feb 02, 2011 8:17 pm Post

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

Posts: 1
Joined: Mon Aug 22, 2011 6:37 pm
Platform: Windows

Tue Aug 23, 2011 1:42 am Post

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.

User avatar
Posts: 9000
Joined: Wed May 05, 2010 5:39 am
Platform: Mac + Windows
Location: city of rain

Thu Sep 01, 2011 10:11 pm Post

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.
Jennifer Hughes
(MM for short)

User avatar
Posts: 59
Joined: Wed Sep 07, 2011 9:19 pm
Platform: Windows

Fri Sep 23, 2011 1:41 pm Post

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.


Version: Beta (743042) 64-bit - 14 Nov 2019
OS: Windows 10 Home 64 bit V.1903 Build 18362.476

Posts: 2
Joined: Mon Oct 03, 2011 8:31 pm
Platform: Windows

Mon Oct 03, 2011 9:27 pm Post

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

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

Posts: 17
Joined: Tue Jul 29, 2014 7:23 am
Platform: Mac
Location: Deep in the Heart of Texas

Sat Jun 27, 2015 12:22 am Post

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

User avatar
Posts: 9000
Joined: Wed May 05, 2010 5:39 am
Platform: Mac + Windows
Location: city of rain

Tue Jun 30, 2015 5:16 pm Post

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.
Jennifer Hughes
(MM for short)