Wednesday, February 20, 2008

Redirecting Output from Command Line Programs

With most command line programs, you can redirect the output to a file.

This is useful if you want to capture the output of a program.

Simply run the program and add a " > filename" after the command.
Substitute whatever filename you want with no quotes


One example, I frequently compare two files using the FC (file compare) program.
Normally the differences scroll off and I can't tell what they were.
Instead I run FC File1 File2 > difference.txt
Then with notepad it is easy to open up difference.txt and view all the changes.

No comments: