grg99
asked on
Fancy use of "Start" command..
I need to start a program running at low priority, so I'm using the "start" command.
Not hard, just type: start /low command
EXCEPT, I need to pass some parameters that have spaces in them.
Not Tooooo hard: start /low cmd "param one"
EXCEPT, I want to redirect the output of "cmd" to a file.
Not Tooooooo hard, you think: start /low cmd "param one" >Log.txt
NOPE! ">Log.Txt" is swallowed up by "start", so output from "start" goes to Log.Txt.
Wrong.
So how do I get ">Log.Txt" to associate with "cmd", not "Start?"
Not hard, just type: start /low command
EXCEPT, I need to pass some parameters that have spaces in them.
Not Tooooo hard: start /low cmd "param one"
EXCEPT, I want to redirect the output of "cmd" to a file.
Not Tooooooo hard, you think: start /low cmd "param one" >Log.txt
NOPE! ">Log.Txt" is swallowed up by "start", so output from "start" goes to Log.Txt.
Wrong.
So how do I get ">Log.Txt" to associate with "cmd", not "Start?"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@echo off
program "param one" > Log.txt
and then use the start command as:
start /low myprog.bat