Re: system() produces error.

From: thundergnat (thundergnat_at_hotmail.com)
Date: 08/24/04


Date: Tue, 24 Aug 2004 12:05:08 -0400

Nathalie wrote:
> I too have the error "Can't spawn "cmd.exe": No such file or directory
> at line "
>
>
> If I issue the command manually on the command line, then
> it doesn't work, but the error "Can't spawn "cmd.exe": No such file or
> directory at line" doesn't appear.
>
> In either case, a window opens and tells me that the program UNKNOWN
> that I've called cannot work properly and that it has to be closed.
>
> My syntax is
> system "C:\\Program Files\\Programmes LINKAGE\\unknown";
>
> I know that the UNKNOWN program works properly, because it works on an
> other data set.

This is only peripherally perl related.
In the DOS command window, when calling parameters have a space in them,
you need to enclose them in double quotes. Try something like:

system "\"C:\\Program Files\\Programmes LINKAGE\\unknown\"";

or even better:

system '"C:\Program Files\Programmes LINKAGE\unknown"';

This news group is doesn't exist. Please use comp.lang.perl.misc in the
future.



Relevant Pages

  • Capturing output from a command
    ... would be interesting to try to write a Java program to parse my firewall log ... Here is the method I have written to do the traceroutes. ... The line where I show what is executing is showing me a command that works ... in the dos command window but the file I'm writing to does not ...
    (comp.lang.java.help)
  • Re: how do I find what this computers IP address is under Vista
    ... Am I misunderstanding what's meant by "command box?" ... Command box means DOS box. ... Open a DOS command window and type IPCONFIG /all and press enter. ...
    (microsoft.public.windows.vista.general)
  • Re: how do I find what this computers IP address is under Vista
    ... "Bill Anderson" wrote in message ... Am I misunderstanding what's meant by "command box?" ... Command box means DOS box. ... Open a DOS command window and type IPCONFIG /all and press enter. ...
    (microsoft.public.windows.vista.general)
  • Trouble with Process.Start
    ... I have a relatively long command that I'm attempting to get process.start to ... execute. ... pasting the unaltered version of this to a dos command window ...
    (microsoft.public.dotnet.general)
  • Trouble with Process.Start
    ... I have a relatively command that I'm attempting to get process.start to ... execute. ... pasting the unaltered version of this to a dos command window ...
    (microsoft.public.dotnet.languages.vb)