wrote:
> Murugesh <> wrote:
> > Hi all,
> > I need to execute a series a commands inside the same shell in
> > Windows.As system() spaws a new shell,how can we do it.
> > command1 and command2 should be executed in the same shell unlike the
> > following.
> > ...
> > system("command1");
> > system("command2");
> > ...
> >
> > Appreciate any help on this.
>
> How do you execute more than one command on the command line on Windows.AS?
>
> On unix, I do:
>
> system("command1; command2")
> or
> system("command1\ncommand2")
>
> Maybe something similar will work with Windows.AS.
>
> Xho
>
I've done this before on windows 2000 command line resulting in 3
appropiate directory listings:
dir d:\*.* d:\*.txt dir c:\*.*
Although I do not have this spawning problem on any of my servers
running Activestate perl, v5.6.1 build 631. What are the commands you
are running in sequence? Are they truly command line programs? Could
the programs you call spawn themselves?
Len