MathGroup Archive 2005

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

Search the Archive

Re: Calling windows programs

  • To: mathgroup at
  • Subject: [mg53574] Re: Calling windows programs
  • From: Peter Pein <petsie at>
  • Date: Wed, 19 Jan 2005 01:59:22 -0500 (EST)
  • References: <csiokk$nnu$>
  • Sender: owner-wri-mathgroup at

Erich Neuwirth wrote:
> In Windows, I create a MIDI file from within Mathematica
> and then I want to play it and delete it with
> Run["mplay32 /play /close " <> file , "del " <> file]
> This does not work.
> The MIDI file  does not even play.
> When I omit the del command, things work.
> Is there a way to force Mathematica to wait before executing the second 
> command until the first one has finished?
> I can solve my problem with a batch file, but I would prefer
> a Mathematica only solution.
It's not a matter of Mathematica. If I remember correctly, at least 
since MS-DOS one has to put an ampersand between two or more 
commands in one line:

Run["mplay32 /play /close " <> file , "& del " <> file]

should do the job.


Peter Pein

  • Prev by Date: Re: Matrix Problem
  • Next by Date: Re: Calling windows programs
  • Previous by thread: Calling windows programs
  • Next by thread: Re: Calling windows programs