Using Scrivener with Dropbox

It’s not impossible, there really is no such thing as flawless synchronisation, so maybe something is glitched on their server and isn’t recovering gracefully. It would be unlikely though. The main trigger for this, by the way, is the “user.lock” file inside the project bundle, under the Files directory. If for some reason Dropbox is not cleanly removing that file when you quit, that would cause the program to think it’s still open.

Well, sorta. :slight_smile: The time between using computer A and computer B is less important than getting a clean and full upload/download while still on A or B. In other words, if I shut down the Mac with the Apple menu while Scrivener is open, chances are extremely high that everything will be closed before Dropbox even gets a chance to upload the last set of changes you made (like removing that lock file). Even if you wait ten years to open it on the second computer, Dropbox will never know there was a last batch of changes pending on the first computer.

Same thing can happen in inverse on machine B. If you fire it up and instantly open your project while Dropbox is still downloading the latest version, you’d actually end up loading a partial copy of the changed project since your local computer is completely up to date from the server yet.

I’d suspect the first problem though, based on your description. It’s more likely you are shutting down to quickly on both computers and so the last set of edits aren’t on Dropbox at all. If you do this a lot, you’ll end up with a bunch of “Conflicted” files in the bundle which can, over time, lead to instability (a problem which can be reversed with a little diligent manual labour of going through all the conflicted files and erasing everything but the latest copy of each one, and renaming it to not have the parenthetical that Dropbox adds, if the conflicted copy is the most recent).

To avoid this, quit Scrivener and then shut down the computer only after the Dropbox icon in the menu bar has stopped “spinning” and has a green checkmark beside it (or if you are using the black and white theme, when it looks like a solid box, sans any animations).

I’ve never actually tried doing that, but it wouldn’t surprise me if that causes Dropbox to re-download everything from scratch, regarding the machine as a “new” computer in the network—so you’d have the same problem if you did that and then quickly tried to do something in that folder. Even worse, because a full download could take hours rather than seconds.

No, I don’t think what you describe are necessarily the problems. For one thing, I am not shutting down the computer (after closing Scrivener) until the Dropbox icons indicate that sync is completed (with the little green checkmark). If there is something else that needs to happen for a clean save and sync to Dropbox, I am not sure what it is.

Also, I can confirm that Dropbox did not re-sync files to the local machine after changing its name – not even after restart. All was looking as right and proper.

In any case, I am not sure any of that matters because the plot thickens

So I had started with computers named A and B (for the sake of argument). I had already arbitrarily renamed computer A to A2. Then (as I suggested I would) I blew away (from A2) the Dropbox copies of the project (and its various safety copies). All gone, both from online and from the local Dropbox folder. I restarted A2, and copied an untouched-for-two-or-three-weeks-whilst-I-played-with-Dropbox copy of the project to Dropbox. Natch, the little green checkmark was waited for. But when I tried to open it, I got the warning message that the file seemed to be open on A (not A2). Of course, there is (technically) no longer a computer named A. Also, there were no projects of any kind open on A2 (or B for that matter). And perhaps most curiously of all, the clean local copy on what is now A2 also gives a warning message about being open on A when I try to open it. Of course, it was not open when I changed the computer name, nor was Scrivener even running when I changed the computer name – though, of course, when it was last saved, it was running on a computer named A.

Well, perhaps what I will do is open and then save a “safety copy” of the local copy of the project, rename the original local copy to _old or something, change the “safety copy” name to my usual proj file name, and then see if I can get Scrivener to agree that “former-safety copy” is only open on the one local machine A2. Then (assuming success), I can copy that to Dropbox (with appropriate saving, closing of Scrivener, and awaiting green Dropbox checkmarks) and see if Scrivener agrees that the newly Dropboxed copy is not open on A2 (or anywhere else). If that works, I can then play with trying to open from Dropbox on B …

OK, so far so good: Scrivener agrees that my (newly made from safety to live) local copy of the project on A2 is not open anywhere else.

So, Scrivener closed. A pause for breath. Project copied to Dropbox. Another pause for breath. (Or, actually, changing my baby daughter :wink:) So, now to see what happens when I try to open the DB copy …

Awesomeness. The new copy of the project (copied from A2 to Dropbox) also now opens from Dropbox without Scrivener thinking it is anywhere else. :slight_smile:

Close Scrivener. Confirm that Dropbox shows happy green checkmarks. Now will shut down A2 entirely. In about 12-18 hours, I will fire up B, wait for Dropbox sync, and then try to launch the DB copy from B. Fingers crossed that that I don’t get a message that it’s open on A2 (which should be impossible, as the computer will be powered off) …

If that works happily, then I will try opening it with the Windows beta (from a third computer, W) as well. If that works, then … :smiley: Endless awesomeness. :slight_smile:

I have high hopes! I am not sure what happened to get Scrivener thinking that projects were always opened somewhere else. There must have been some weird error in syncing or something (not that it matters for the integrity of the project, since I now have a new copy that never previously went through sync, as well as a local backup of that, and all the backup zip files) that threw it for a loop. I have been pretty careful all along, but it’s always possible that I or a network connection sneezed somewhere …

I haven’t tested this, but I’ve had little Dropbox issues in the past (mostly due to large file and a lousy network connection, nothing ever horrifying and only when I was testing anyway). I wonder if you did get a sync error once where the user.lock file was copied to Dropbox and then never got removed, and now it’s just persistent–possibly having gotten the name changed or whatever, so that Scrivener isn’t touching it to remove it but is still recognizing it as a “this project is open” warning. (As far as the computer name, that’s just stored statically in the user.lock file, so once it’s created it isn’t changed. Thus your changing the computer name doesn’t affect that file, which was created back when you last opened the project on that computer.)

Yes, based on what you describe, a somewhat random error acting on the user.lock file would seem a plausible culprit.

I have now actually deviated from my test plan slightly by opening the project (last saved to Dropbox from Mac A2, itself currently powered down) on my Windows machine W. Although I did see some funkiness in the displayed content, I got no messages about the file being open elsewhere – which I take as a good sign. :slight_smile: The visible funkiness may be Mac-Winbeta issues (?) and quite likely nothing to do with Dropbox, though I shall go away and start studying the Scrivener for Windows forums to learn about that. With the Windows beta and project now closed on the Windows machine, I’ll trying opening from Dropbox on Mac B later on today.

Hello,
Thanks for help with my previous query: I think I’ve got the synopsis/note card deal now, and the Scrivener /Dropbox/ Plaintext has been working a dream…

Until today!:
I did a chunk of work on Plaintext (via iphone) and then synced it to the project on my laptop, but it didn’t upload the new work. When I opened it on Plaintext – gah! – it synced with dropbox and got the old version, in other words I lost 1000 words. Is there any way of retrieving it? I know with Scrivener and you see the pre-sync snapshots, but this was on plaintext.
And if not, any tips for not letting this happen again?
Have also been having problems with plaintext rolling back a few minutes and reverting to previous versions of sentences etc. while using a document. Anyone else had this?
Don’t want to drop this system as when it works it’s great…but problems beginning to outweigh convenience…
thanks
Sophifire

I’m concerned, based on the comments you made toward the end, that PlainText might never have saved your work to Dropbox in the first place. But, if it did, you might be luck. Use the Dropbox icon in your menu bar to “Launch Dropbox Website”. In the web interface, locate the files that reverted, and for each one, click the down-arrow to the right of it. At the top of the drop-down menu, you should see an option titled, “Previous Versions”. Click that, and you’ll go to a snapshot list (quite a bit like Scrivener’s snapshots, really) where you can select a prior version and roll it back up to the top.

Like I said though, if PlainText never wrote your changes to the server in the first place, this list will not contain your edits, and you should get in touch with Hog Bay Software and see if there is anything you can do to help resolve what is happening with the program. Some basic advice though, just make sure you have a steady 'net connexion whenever you are working on Dropbox files with your iPad. There is an icon in the top-left corner that indicates when you are online. If that icon disappears, any work you are doing will not be synced until you get back within a WiFi zone.

To ease your mind on our side of the coin, I doubt anything went afoul with Scrivener—but when it does, you can usually revert mistakes by examining the Snapshots for the files in question. Unless you disable that option (which I really don’t recommend unless you must), every time Scrivener makes a change to a file it backs up the original, first.

Thanks so much AmberV. I did manage to retrieve some text through the dropbox site – but there’s something odd going on. The full text was in Scrivener, but in a different document, one that was saved in a file called Old Drafts. I’m sure I didn’t put it there. If it was a one-time thing I’d put it down to me being mental, but it’s happened again with another document. Not sure what’s going on!
Thanks again, and if you have any idea what this problem might be about i’d be glad to hear it.
Thanks
Sophifire

Sorry, scratch that. The new files are not within another file, but at the very bottom of the Draft folder…

Hi,
I’m new here. English is not my language, so it may be, that I could not find the right answers.
My problem:
I use scrivener on my Mac and would like to do sometime some changes on “the go”. Therefore I put dropbox and PlainText on my I-pod-touch.
So far so good. I CAN find my scrivener project, I can read, and I can even find the document in which the main-text is written … so I COULD change things there … I thought :frowning:
But the file is .rtf and PlainText tells me, that it is not able to edit that.
But some people here ARE writing of changing scrivener-texts on ther I-phone oder I-pad …

Now: Is it possible to change a scrivener-text over my i-touch??

Thank you very much
luc

Rather than put your Scrivener file on drobox, you need to set up “sync to external folder” to a folder on dropbox. See here: youtube.com/watch?v=dVzmMFRGjnQ for a video tutorial.

I’ve got it now! Thank you very much for your help!!

Okay, I now have everything set up to sync to an external folder on Dropbox, which I can then access with Nebulous Notes on my iPod Touch. One issue: when I quit Nebulous Notes, it automatically syncs to Dropbox – which is great. But I can’t figure out a way to get Scrivener to the same. Do I have to go through the process of clicking “Sync with External Folder” every time I close Scrivener? Or is there some way to get Scrivener to automatically sync as it closes (the way that it automatically backs up)?

The issue is that you can forget to sync, meaning you’ll have an older version in Nebulous Notes. (A related question: any way to get “Sync with External Folder” as a button on the toolbar? That would at least be better than having to navigate the File menu each time.)

Yes, you can get Scrivener to sync when you close the file. Just check “Check external folder on project open and automatically sync on close” on the “Sync with External Folder” setup pane.

That’s precisely what I’ve been looking for, but it doesn’t show up in my setup pane. (Assuming that’s the pane that pops open when you click File > Sync > with External Folder.) I get the option “Check for changes in external folder on project open” – but nothing that addresses project close. I assume I’m looking in the wrong place; where do you find this check box?

Make sure you are running the latest version (2.0.5). The original, one-way automatic method you are describing is from an older version. This checkbox now causes Scrivener to check for updates on project load, and automatically syncs any necessary files out when you close.

Gotcha. Upgraded, and everything’s fine. Thanks!

I’m glad to hear that DropBox can be a solution for syncing, if used with care.

I just came across a similar syncing service - “SugarSync”. It looks attractive since it allows a larger amount of space on a free account.

Would the same caveats apply to using that service?

Yes, they both operate in a similar fashion. The main user-end difference between the two is that SugarSync lets you select what things you want to maintain between computers, while Dropbox uses a central folder. They also both use the same system for conflict resolution, producing duplicate files of the mismatching item, so if you do run into issues, resolving them can be done in the same fashion as one might fix a project that has been mangled by Dropbox.