Lisp HUG Maillist Archive

Probem running CALL-SYSTEM-SHOWING-OUTPUT

I'm having a problem executing an external third party software.
I used to place a call to CALL-SYSTEM-SHOWING-OUTPUT and it ran like a  
champ.
The software recently had an update and the new directory contained a  
couple spaces.
Now my program runs fine, only with out executing the external third party  
software.


(FOREIGN:CALL-SYSTEM-SHOWING-OUTPUT (concatenate 'STRING "C:/foo1/foo2  
foo3 foo4/foo5.exe /b " FooTempPath))
; C:/Foo1/Foo2 Foo3 Foo4/Foo5.exe /b C:/Windows/Temp/FooChange.scr
; 'C:/Foo1/Foo2' is not recognized as an internal or external command,
; operable program or batch file.
1

OR

CL-USER 17 > (HWEB::SHELL-OPEN-COMMAND (concatenate 'STRING  
"C:\\Foo1\\Foo2 Foo3 Foo4\\Foo5.exe /b " FooTempPath))
2

Yet neither one executes Foo5.exe. This worked before the space in the  
directory i.e. "Foo2 Foo3 Foo4" appeared.
What am I doing wrong?


Regards,

William


Re: Probem running CALL-SYSTEM-SHOWING-OUTPUT

On Jan 10, 2012, at 17:52 , William P. Proffitt wrote:
> 
> I'm having a problem executing an external third party software.
> I used to place a call to CALL-SYSTEM-SHOWING-OUTPUT and it ran like a champ.
> The software recently had an update and the new directory contained a couple spaces.
> Now my program runs fine, only with out executing the external third party software.
> 
> 
> (FOREIGN:CALL-SYSTEM-SHOWING-OUTPUT (concatenate 'STRING "C:/foo1/foo2 foo3 foo4/foo5.exe /b " FooTempPath))
> ; C:/Foo1/Foo2 Foo3 Foo4/Foo5.exe /b C:/Windows/Temp/FooChange.scr
> ; 'C:/Foo1/Foo2' is not recognized as an internal or external command,
> ; operable program or batch file.
> 1
> 
> OR
> 
> CL-USER 17 > (HWEB::SHELL-OPEN-COMMAND (concatenate 'STRING "C:\\Foo1\\Foo2 Foo3 Foo4\\Foo5.exe /b " FooTempPath))
> 2
> 
> Yet neither one executes Foo5.exe. This worked before the space in the directory i.e. "Foo2 Foo3 Foo4" appeared.
> What am I doing wrong?


Try specifying the command and parameters as a list of strings, instead of as a single string containing both command and parameters. The mechanism that runs the command has no way of knowing that the space character between Foo2 and Foo3 should be treated differently to the one between foo5.exe and /b.

Something like the following should work:

(system:call-system-showing-output (list "C:/foo1/foo2 foo3 foo4/foo5.exe" "/b" FooTempPath))



Re: Probem running CALL-SYSTEM-SHOWING-OUTPUT

>
> Something like the following should work:
>
> (system:call-system-showing-output (list "C:/foo1/foo2 foo3  
> foo4/foo5.exe" "/b" FooTempPath))
>
>


Thanks so much, that worked. I knew I was missing something.

Regards,

William


Updated at: 2020-12-10 08:37 UTC