MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Batch save mode?

  • To: mathgroup at
  • Subject: [mg105137] Re: [mg105116] Batch save mode?
  • From: "David Annetts" <david.annetts at>
  • Date: Sun, 22 Nov 2009 06:08:52 -0500 (EST)
  • References: <>

Hi Erik,

> I'm going to be away from my copy of Mathematica for a while 
> and may potentially want to show the work I've been doing for 
> some friends.  I have several dozen notebooks and don't 
> really want to save them all manually; is there an easy way 
> to get Mathematica to batch load notebooks and save them as PDF?

There is FileNames[], StringReplace[], NotebookOpen[], Export[] &
SetDirectory[] ....  

In a fresh notebook, have you tried something like

SetDirectory["directory where my notebooks live"];
ifile = FileNames["*.nb"];
ofile = StringReplace[#, {"nb"->"PDF"}]& /@ ifile;
	inb = NotebookOpen[ifile[[#]]];
	Export[ofile[[#]], inb]
)& /@ Range@Length@ifile;

YMMV depending on exactly what you want to do before saving the notebooks.



  • Prev by Date: Re: MatchQ, silly question
  • Next by Date: compositions with the restricted set of integers
  • Previous by thread: Batch save mode?
  • Next by thread: Re: Batch save mode?