Loading ...
Sorry, an error occurred while loading the content.

525Re: Calling executables with spaces in Perl

Expand Messages
  • Eyeless Devil
    Jul 7, 2004
      --- In perlguitest@yahoogroups.com, "bullitt133" <noel.peterson@a...>
      wrote:
      > How do I go about calling an executable that has spaces in it.
      > Below is what my code currently looks like which returns the error
      > of: Couldn't find the file "ProfEdit.exe".
      > ...
      > ###Creating Resize Profile
      > system ("start \"Dr.DivX ProfEdit.exe\"");
      > sleep 2;
      >
      > I have tried it without the \ and with single quotes with no
      > success. Any help would be greatly appriciated.

      When I tried this, a 2nd dialogue came up without executing the app.
      After looking at the help for START, I noticed that the first param
      is a title string. When I put two escaped quotes or basically an
      empty string placeholder, it finally executed:

      my (@args) = ("start", "\"\"", "\"C:\\Documents and
      Settings\\setup.exe\"",);
      system(@args)==0 or die "@args failed: $?";
    • Show all 6 messages in this topic