Start program without waiting and redirect output

How do I start a console program in a btm file, redirect its output, and have the btm file continue? I tried

start "Title" /tab Foo.exe > Out.txt

This doesn't work. In fact, sometimes Take Command stops working and then restarts. Also tried

detach Foo.exe > Out.txt

This doesn't work either.

TCC 12.00.42 x64 Windows 7 [Version 6.1.7600]
 
May 20, 2008
3,515
4
Elkridge, MD, USA
---- Original Message ----
From: David Marcus
| How do I start a console program in a btm file, redirect its output,
| and have the btm file continue? I tried
|
| start "Title" /tab Foo.exe > Out.txt
|
| This doesn't work. In fact, sometimes Take Command stops working and
| then restarts. Also tried
|
| detach Foo.exe > Out.txt
|
| This doesn't work either.
|
| TCC 12.00.42 x64 Windows 7 [Version 6.1.7600]
---- End Original Message ----

I would try this:

Foo.exe > Out.txt

--
HTH, Steve
 
I would try this:

Foo.exe > Out.txt

I want the btm file to continue, not wait for Foo.exe to finish. I've got a program that takes several hours to run. I want to do several runs concurrently, since my computer has multiple cores. I can open tabs manually and paste the correct command into each, but it would be simpler for me if I could launch all the processes from a btm file.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,689
106
Albuquerque, NM
prospero.unm.edu
How do I start a console program in a btm file, redirect its output, and have the btm file continue? I tried

start "Title" /tab Foo.exe > Out.txt

This doesn't work. In fact, sometimes Take Command stops working and then restarts. Also tried

detach Foo.exe > Out.txt

This doesn't work either.

TCC 12.00.42 x64 Windows 7 [Version 6.1.7600]

Perhaps:

Code:
start "Title" /tab %_cmdspec Foo.exe > Out.txt

(I don't know anything about Foo.exe, but it probably doesn't expect redirection characters in its command line.)
 
May 20, 2008
12,171
133
Syracuse, NY, USA
On Wed, 29 Dec 2010 11:55:49 -0500, David Marcus <> wrote:

|How do I start a console program in a btm file, redirect its output, and have the btm file continue? I tried
|
|start "Title" /tab Foo.exe > Out.txt
|
|This doesn't work. In fact, sometimes Take Command stops working and then restarts. Also tried
|
|detach Foo.exe > Out.txt
|
|This doesn't work either.
|
|TCC 12.00.42 x64 Windows 7 [Version 6.1.7600]

This, for example, works:

Code:
start /b %comspec /c netstat ^> netstat.txt

Note, %comspec is needed to provide the redirection, /b prevents an unsightly
new console, /c causes the new instance of TCC to exit when the (netstat)
command has finished. and excaping the redirection symbol makes it part of the
command sent to %comspec.
 
May 20, 2008
12,171
133
Syracuse, NY, USA
On Wed, 29 Dec 2010 12:07:00 -0500, Steve Fábián <> wrote:

|---- Original Message ----
|From: David Marcus
|| How do I start a console program in a btm file, redirect its output,
|| and have the btm file continue? I tried
||
|| start "Title" /tab Foo.exe > Out.txt
||
|| This doesn't work. In fact, sometimes Take Command stops working and
|| then restarts. Also tried
||
|| detach Foo.exe > Out.txt
||
|| This doesn't work either.
||
|| TCC 12.00.42 x64 Windows 7 [Version 6.1.7600]
|---- End Original Message ----
|
|I would try this:
|
| Foo.exe > Out.txt

The BTM will wait for that to finish. He wants the BTM to continue while that
happens.
 

Similar threads