I have a large folder of existing notebooks, each currently containing a single cell of input. I would like --- in each of these notebooks --- to evaluate that cell, evaluate a new chunk of code I've written (whose purpose is to Export
a text file and an image created from the data in the notebook), and re-save the notebook.
How can I do this in an automated way for the whole folder of files?
[Note: Each notebook has the same variables defined, but I have Notebook's Default Context
set to Unique to This Notebook
, so there should be no conflicts.]
a=1
in a notebook, thena==1
isTrue
in all. Notebooks are just containers of text. $\endgroup$Notebook's Default Context
set toUnique to This Notebook
$\endgroup$Export
statements. So I want to evaluate the existing code in the notebook (which is in a single cell), then run my new code (which exports an image and a text file). $\endgroup$NotebookEvaluate
? I'd suggest you take a stab at it and see what problems you run into. $\endgroup$