in reply to Re^2: Call batch script in new command / DOS window
in thread Call batch script in new command / DOS window

I've already presented the solution

'scuse me for being 1 minute behind you in posting.

If the OP doesn't want to wait for the child to finish

Since he didn't specify, I pointed him at the documentation.

and you need to use quotes,

Nope! This works:

c:\test>type DigThis.bat @echo I'm diggin' it c:\test>p1 [0] Perl> system "start c:\\test\\DigThis.bat";;

But this doesn't!

[0] Perl> system("start \"\" \"c:\test\DigThis.bat\"");

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^4: Call batch script in new command / DOS window
by ikegami (Patriarch) on Aug 21, 2008 at 22:26 UTC

    scuse me for being 1 minute behind you in posting.

    I was just repeating that solution to make the node complete, not as an indication that there was a problem with the timing of your answer. Call it an inlined hyperlink if you wish.

    Nope! This works: system "start c:\\test\\DigThis.bat";

    I never said it didn't. I didn't say quotes were needed. You misquoted me. The fragment of my sentence you quoted was part of the condition ("If ... you need to use quotes, ...").

    But this doesn't! system("start \"\" \"c:\test\DigThis.bat\"");

    Only because the file doesn't exist. File names with tabs in them appear to be illegal in Windows. On the other hand, the following *does* work.

    system("start \"\" \"c:\\test\\DigThis.bat\"");