wolfram-mathematica

Saved Mathematica file not actually saved


I have a well-honed Control-S reflex (i.e. I obsessively save my work), but when Mathematica crashes with a file open the saved changes are not recovered when I restart Mathematica and open the file. It reverts back to the file's state when I first opened it before making (and saving) any changes.

How can I actually save my work, without needing to save, close and re-open a notebook with the same obsessive regularity that I "save"?

I'm running Mathematica 8.0 on a Windows XP x64 machine.

Edit: Just to clarify, I'm not so worried about the crashing. I'm concerned about saving not actually saving.


Solution

  • This may be a case of Windows not flushing its disk cache to disk. You might want to try the Sysinternals' tool Sync. "Use it whenever you want to know that modified file data is safely stored on your hard drives."

    You can have Mathematica call Sync using Run and automate the process in the background using scheduled tasks like in this answer.