I've always wondered how to capture output from a command line program in windows, and the record it into a file.
while you can always just the greater-than-sign to output text into a file at the windows command prompt, sometimes it just isn't good enough.
I ran into this once with mysqldump.exe.
Well I finally found the code that works. In this example I call 'dir'.