<div><div class="gmail_quote"><div>Try this:</div><div><br></div><div>std.process.system("cmd /c \"c:\\Program Files\\some program.exe\" > \"c:\\file name\"");</div></div><br><div>If that doesn't work then you may have to do it like this:</div>

<div><a href="http://msdn.microsoft.com/en-us/library/ms682499(VS.85)">http://msdn.microsoft.com/en-us/library/ms682499(VS.85)</a></div></div><div><br></div>On Wed, Jun 29, 2011 at 5:58 AM, s4mmael <span dir="ltr"><<a href="mailto:fake@mail.com">fake@mail.com</a>></span> wrote:<br>

<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi all!<br>
<br>
I'm trying to run the following command with the 'system' function:<br>
std.process.system("\"c:\\Program Files\\some program.exe\"");<br>
Because it's double quoted it's OK.<br>
<br>
Now I want to redirect an output of "some program.exe" to a file:<br>
std.process.system("\"c:\\Program Files\\some program.exe\" > c:\\filename");<br>
And it works well too.<br>
<br>
Then I'm trying to quote a 'filename' in case in includes a white space:<br>
std.process.system("\"c:\\Program Files\\some program.exe\" > \"c:\\file name\"");<br>
but I got the following message on a standard output:<br>
'c:\Program' is not recognized as an internal or external command, operable<br>
program or batch file.<br>
<br>
What is the right method to quote both paths in case of redirection to a file?<br>
Thank you beforehand for the answer. Any advice would be greatly appreciate.<br>
<br>
Thanks beforehand for the answer.</blockquote></div>