From: lora on
Hello,

I'm using tcl version 8.4 and package expect version 5.43.

Has anyone been able to run a cmd shell and from there run a bat file
with some commands in Windows?

Pls advise.
From: Arjen Markus on
On 12 mei, 00:07, lora <anjela_...(a)yahoo.com> wrote:
> Hello,
>
> I'm using tcl version 8.4 and package expect version 5.43.
>
> Has anyone been able to run a cmd shell and from there run a bat file
> with some commands in Windows?
>
> Pls advise.

You will need to use the [auto_execok] command to find out how to
start
an internal command from the command shell (auto_execok returns the
right
invocation). On the other hand, you can simply run batch files with
the
[exec] command, they won't be interactive then.

For instance:

auto_execok dir

returns (on my system):

C:/WINDOWS/system32/cmd.exe /c dir

Then with "eval exec [auto_execok dir]" (or, better: exec {*}
[auto_execok dir])
I get a directory listing.

Regards,

Arjen