|
[Date Index]
[Thread Index]
[Author Index]
Re: Bare Bones Backup Button
Selwyn,
Yes, I'd like to see your auto-backup version.
Murray
Selwyn Hollis wrote:
> This is something I've wanted for years. Click the button, and a copy
> of the current InputNotebook -- with output cells deleted -- is
> Exported into a backup folder in your $HomeDirectory.
>
> CreateDocument[PaletteNotebook[
> Button["Bare Bones Backup",
> Module[{filename, thisnb = InputNotebook[]},
> If[thisnb =!= $Failed,
> CreateDirectory[ToFileName[{$HomeDirectory, "MathBackups"}]];
> filename = StringJoin[
> StringReplace[(WindowTitle /. AbsoluteOptions[thisnb]),
> s_ ~~ ".nb" -> s], "_",
> StringJoin[ToString /@ Round /@ Rest[Date[]]], ".nb"];
> Export[ToFileName[{$HomeDirectory, "MathBackups"}, filename],
> DeleteCases[NotebookGet[thisnb], Cell[_, "Output", ___],
> Infinity]]
> ] ] ] ] ]
>
> (Button is new to 6, but the function inside Button should work fine
> in 5.2.)
>
> I've got a version of this that runs automatically every 15 minutes
> (you can change the interval, of course). Anyone who's interested
> should let me know.
>
> Selwyn Hollis
>
--
Murray Eisenberg murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305
Prev by Date:
Re: Options for a very large computation
Next by Date:
Re: newlines, newlines ...
Previous by thread:
Bare Bones Backup Button
Next by thread:
Re: Bare Bones Backup Button
|