Is this a virus?

Slight problem.

I have a project for a course I’ve been running for some years; it contains every story every student has written, their files, their photos, etc.

But something’s gone horribly wrong with it.

One of the students sent me a story, in Word, as they normally do. I copy-and-pasted it into a new document the student’s folder, as I normally do. I edited it, pasted it into an email and went to send it to the group.

There were four new students in the group, so I went to the main folder in the project for this term to add their emails to the main list. But instead of finding names of each student and descriptions of each one’s desires from the course, plus their emails, I found the text of the story I’d just edited.

“Idiot,” I thought, “That’ll teach me to edit a story when I’m so tired.”

So I clicked into the document where I’d intended to put the story. And there it was. I figured that I’d made some stupid mistake, and I decided that the next thing I needed to do was to update the list of students’ emails. But when I clicked into that folder, what was there…? The story.

Then I went to another program and copied in the missing emails.

Went back and noted that one of the student had no email address. So I typed in “No email” in bold in her file.

Then I clicked into the main folder. It said “No email”. Clicked into another document that should have had a 2,000-word story. It said “No email”.

I shut down the project. Shut down the two other open projects (one a book I’m writing, already around 50,000 words; the other my Stories project with many stories). Thankfully, neither of them seemed to contain any “No email” documents.

Shut down the computer. Restarted it. My students’ folder still contains only documents and folders containing only the words “No email”.

What can i do?

Further to this, I looked at the size of this project, and compared it to the size of another that I know to have much less information in it. This project (which shows only the words “No email” in every document in it, including Scrivener documents, PDFs, etc) shows as 661.9MB; the one I know to contain far less information is 4.4MB.

Can the problem be with Scrivener’s View menu? Is all the information there, really, but somehow not showing?

Somebody who knows more about this sort of thing will hopefully be along to help with more detail soon, but I can tell you how to answer your last question – is the data still there.

Go to your project in Finder, right click on it and choose ‘Show Package Contents’, then navigate to Files > Docs.

You’ll see a long list of numbered files: mostly RTF (they may be some .txt and .pdfs and .docs etc in there too). The RTF files contain the Editor text and notes of binder documents, the .txt the synopses.There’s no way of telling here which numbered file relates to which binder in the document, but you can see their contents quickly by sorting the files by kind (cmd-2 for list view first) and then using either QuickView (Space + down arrow) or Cover-flow (cmd-4 + right-arrow) to page through them.

At least you’ll know the data is there or not – then someone else can hopefully help you from there.

PS - I hope at least you have a recent backup.

I can see when I open the project that the files are all there. What I can’t see is their contents, since all that happens when I click on one is that I see the words “No email”. I would guess that the original contents are still there, because a few hundred folders and files each with those two words would scarcely make a project so large.

Actually, I did what you suggested, brookter, and in ‘Show Package Contents’ I used the select-spacebar trick to view the contents of a couple of files. Sure enough, they were stories from students, my comments, etc.

I don’t have a recent backup. It’s been my practice always to encrypt my backup drive (after all, why password-protect your computer and then have everything free to view on a backup?) but my latest backup drives take days to back up, apparently as a result of this encryption. Due to personal circumstances over the last couple of months, I haven’t been able to put the computer into backup mode over three days at a time.

I don’t know if this is to do with new technology in external drives or what the story is.

What about your Scrivener zip backups (which are generated each time you close the project, or - via Preferences - at a point decided by you, e.g. each time you do a Save, or at a scheduled time)? You might be able to restore an older version of your Project that’s not messed up - but meanwhile first save the current corrupt one as a new project suitably renamed, so you have the files of the most recent changes you made.

Thanks for this excellent suggestion, ScriverTid.

I’m sorry to be stupid, but how do I do this? Do I go to the file called, eg, “Writing Course” (used to be “Writing Course.scriv”) and change its name in finder, then unzip the backup (which will hopefully be called “Writing Course.zip”)?

What worries me is the fear that this may be a virus, and may infect my other Scrivener projects.

Edit: There’s also the problem that the backup is probably too recent - I’ve opened, checked and closed the project several times since this started…?

No question is stupid if you don’t know the answer!

Your current project is called Writing Course.scriv and appears to be corrupt. You can duplicate this in Finder and rename the duplicate ("…copy") to something like Writing Course corrupt.scriv - make sure it’s the same size as the original.

Then go to where your Scrivener backups are located, and they will be called Writing Course.bakn.zip - mine are in user/Library/Application Support/Scrivener/Backups. (Check n carefully - my most recent backup is bak3 but there’s an older bak4! Choose one that’s older than the date and time this corruption first appeared and restore that one.

There is no backn.

There is a “Backup.bak.zip” (7 November 2015) and then a series of “bak.zip” (24 September 2017), then “bak1.zip”, “bak2.zip”, “bak3.zip” and (last) “bak4.zip” (all yesterday).

Incidentally, should I keep, nuke or rename the original project that I copied?

Further edit: is it possible to duplicate a bak.zip file before opening it?

And further edit again, I did it (duplicated the bak.zip file from 24 September and opened it) and it was fine. Thank you so much for this!

How can it have happened that the project became corrupted? Is this a sign of a virus, or does it occasionally happen?

Further edit: in the Library/Application Support/Scrivener/Backups folder, there is now a file for today, but its suffix is not .bak like the others but .scriv - what on earth is happening now?

Something really weird happened. I nuked the corrupt file and woke up a zipped backup from the day before.

I hadn’t lost much so I emptied the trash of both the renamed corrupt file and its duplicate.

Then I went to back up, sighing at the thought of three days of endless encrypting of the backup.

The backup took two hours in total.

Could this file have been causing the encryption problems all along?

One further question: since the backups are not being properly named, should I reinstall Scrivener? And how do I protect my backed-up files while I do so?

I think when you chose to do a backup with the ‘backup now’ command in the file->backup menu, it creates a backup named project-name.bak.zip. When it creates an automatic backup, I think those are the project-name.bak1.zip (and bak2, etc) files. The numbers on the files are probably how Scrivener keeps track of how many backup files it has so it can keep just the most recent 5 or so.

  1. bakn was a kind of algebraic shortcut, where n= a number. I.e. bak1, bak2, bak3, etc
  2. Keep the original corrupt project on stand by until you’re sure the problem is resolved
  3. It’s certainly possible to duplicate it in Finder - whether Scrivener could handle a renamed backup is a separate matter.
  4. Good!
  5. Not necessarily. All complex software can cause the occasional glitch which may, or may not, have been caused by something the user did.

Further: the backup folder should not be where you save a project to - you may have accidentally changed where you save to?

It sounds as if the problem is now resolved?

Ah, thanks, that n had me foxed.

At the moment I’m reindexing (as I’ve discovered that Spotlight appears not to have indexed some Scrivener files going back to 2014 and earlier), and will then hide my backups from Scrivener, copy my prefs to the desktop, delete all the com.plist type files I can find for Scrivener, and then do a clean reinstall.

Found a load of Scrivener projects that appear to have gone under the radar - they were showing as backups but not in a search or vice versa. The Scrivener projects altogether added up to around 100. So I opened each one, saved it and made sure it had a dated backup.

In some case the project was gone and there was only the backup, so I opened these from the backup, then resaved and re-backed-up, and then put the project on the desktop.

The result of this was that some of the projects then produced both a project (eg “Notes.scriv”) within the Scrivener folder and its subfolders (eg the “Business” subfolder), and also an apparent backup (eg “Notes.backup.scriv”) within the same subfolder as the project sharing its name.

I’ve taken out these 38 backups, or whatever they are, into a folder called “extra mystery backups”.

They’re not the same size; one, for instance, is 5.6MB in the mystery backup, and 11.8MB in the .zip backup I did today. Another is 679KB in the .zip backup and 1.5MB in the “Mystery backups” version.

I’m totally baffled.

IIRC - some of the updates to Scrivener introduced changes in the file format. This meant existing projects would need to be converted to the new format in order to continue to use them. Scriv automatically created a “just in case” backup of those projects as part of the conversion process.

That’s probably the source of your mystery backups.

Ah, thanks. But it’s odd that some of these backups are larger than the file they back up, and some are smaller.