Reset writing history?

Can it be reset? It has some random numbers from before I created the document, I assume from the template.

I don’t think there is a direct way to do this in the App (at least I can’t find one).

However…

Please note: you do this at your own risk. Scrivener’s support team will probably tell you that this behaviour is not supported and they’ll be right. Seriously, you shouldn’t mess with the internals of a Scrivener project unless you know what you’re doing AND you’ve taken a backup copy of the project before you start…

AFAICS, the writing history is kept in a file called writing.history inside Files subdirectory of the Project directory`. If you open this file with Notepad, you should see something like:

<?xml version="1.0" encoding="UTF-8"?>
<WritingHistory>
    <Day dwc="11" dcc="60" dtwc="11" owc="0" occ="0" dtcc="60">2021-06-13</Day>
</WritingHistory>

It’s obvious what’s going on here: dwc for Daily Word Count, dtwc for Draft Word Count, etc. AFAICT, Scrivener looks for this file and if it finds it, it adds a row with the new data. However, if it doesn’t find the file, it simply recreates one from scratch. That means that, in principle, resetting the Writing History should be as simple as deleting or renaming the Files\writing.history file.

So:

  1. Take a backup copy of your project (duplicate it in Explorer).
  2. Make sure you close both projects in Scrivener if they’re open
  3. In Explorer, go to Your Project\Files
  4. Open writing.history in Notepad to make sure that the numbers are what you expect.
  5. Rename writing.history to OLDwriting.history or something obvious.
  6. Open Your Project in Scrivener and check the Writing History. It should have no entries.
  7. Add some text to your project in all the categories to test it (i.e. in Drafts/Manuscript and elsewhere. Make sure that Projects > Writing History reflects your additions properly, then close the project.
  8. You should find that there is a new writing.history file in Your Project\Files – open it in notepad to check. Also, if you use Project Targets and Session Targets, check that they are still working as you expect.

I’ve done some limited testing on this and AFIACT it works, but obviously, only Support can tell you whether there will be any technical issues or knock-on consequences with other features, hence the need to take backups and do your own testing before committing.

HTH.

3 Likes

We just noticed that templates are spawning existing history, which is obviously a bug, and has been filed as a priority to get fixed, since it can mess up your statistics. Ordinarily you would start with a fresh slate.

In the meanwhile, brookter’s notes are exactly what you need. :slight_smile: Deleting the file is perfect safe to do, and if you want to make edits and be safe about it, just make a copy of the file somewhere before doing so.

2 Likes

Excellent. Thank you. :slight_smile:

Great advice, thank you! :slight_smile:

Confirmed, deleting the writing history file resets the writing history with no errors. :slight_smile: A new one is created when you save the project next.

1 Like

Excellent - I’m pleased it helped (and that there is a fix on the way, thanks Ioa…)