Multiple shell commands
J. Landman Gay
jacque at hyperactivesw.com
Sat Nov 6 17:51:44 EST 2004
On 11/6/04 11:33 AM, Jan Schenkel wrote:
> --- "J. Landman Gay" <jacque at hyperactivesw.com> wrote:
>
>>I want to send two commands to a command-line app
>>using shell() on
>>Win98. The first needs to change directories, and
>>then I need to issue a
>>command to a DOS app. Both of these work okay if I
>>type them into the
>>DOS prompt window.
>>
>>When I try to send them via shell() it always fails
>>with "too many
>>parameters". I think I'm having trouble with quote
>>marks, but I don't
>>know enough about shell on Windows to figure it out.
>>Here are the
>>commands I want to send:
>>
>>cd "C:\Program Files\Conversion
>>Software\w32-rbmake-1.1\"
>>
>>rbMake -ebjTs -otest "C:\Program Files\Conversion
>>Software\README.txt"
>>
>>How would you format these? I tried using single
>>quotes around the file
>>paths but it doesn't work. Omitting the quotes
>>entirely also fails, even
>>if I only send the first line. I have also read that
>>we can use "&" to
>>join and send multiple commands to shell() but when
>>I try it, I still
>>get "too many parameters" with the "&" shown as the
>>culprit.
>>
>>Anyone know how to do this?
>>
>>--
>>Jacqueline Landman Gay
>
>
> Hi Jacque,
>
> A few ideas :
> - you may have to fiddle the 'shellCommand' property
> (see Ken Ray's site)
I looked there yesterday but couldn't find what I want to do, except
that I did learn I could use "&" between command lines. Only I can't get
that to work. Do I need to change the shellCommand property even if the
shell window is opening successfully?
> - you could avoid the quotes in the file paths by
> using the 'shortfilePath' function
I thought of that, but Rev doesn't seem to recognize it. There is only a
"longFilePath" function, which isn't what I need. I was hoping it would
work in reverse, but got an unrecognized handler error when I asked for
the shortFilePath.
> - as a last rescue, you could write the two commands
> to a temporary batch file, and then execute that file
That sounds promising. How is that done?
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list