MathGroup Archive 2010

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

Search the Archive

Re: Launching several Mathematica programs from DOS command

  • To: mathgroup at
  • Subject: [mg107341] Re: Launching several Mathematica programs from DOS command
  • From: Albert Retey <awnl at>
  • Date: Tue, 9 Feb 2010 07:59:56 -0500 (EST)
  • References: <hkr3pj$aa9$>


> Is it possible to run Mathematica (evaluate cells) with DOS Command?
> I am working with Mathematica 5.2 and I would like to launch a batch
> of Mathematica programs (that hardly can be written in text file as
> suggested in the batch mode),

I really wonder which secret features of Mathematica you are using that
can not be coded in InputForm and put into a text file :-)

> each program creating different output
> files (.xls). No problem to open the Mathematica code from DOS, but I
> can't achieve running it... Any help?

Search for UsingFrontEnd in the documentation. It will do what I think
is you need. Still you would need to write a .m file to feed to the
Kernel in the batch file, but you could then use all the features of the
FrontEnd concerning Graphics and Export.

If you want to run a notebook file without touching it, I think putting
the following code to a .m file and run it in batch mode should be a
start for what you want to do...

  nb = NotebookOpen["YourNotebookFile.nb"];
  SelectionMove[nb, All, Notebook];
  FrontEndTokenExecute[nb, "EvaluateCells"];



  • Prev by Date: Re: Mathematical Symbol
  • Next by Date: Re: Covariant derivatives of tensors?
  • Previous by thread: Launching several Mathematica programs from DOS command
  • Next by thread: Difference between Animator and Trigger?