Prev: expr oddity?
Next: Newbie question on 'eval' and '{*}'
From: lora on 11 May 2010 18:07 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 12 May 2010 03:13 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
|
Pages: 1 Prev: expr oddity? Next: Newbie question on 'eval' and '{*}' |