At the end of the command line, add

> file.ext or 1> file.ext to redirect standard output
2> file.ext to redirect standard error

You can use >> to append to an existing file.

For further information, see http://www.microsoft.com/resources/d....mspx?mfr=true

Now, if I could just figure out how to do this for a Windows app, I'd be laughing!