Displaying Windows command prompt output and redirecting it to a file

How can I run a command-line application in the Windows command prompt and have the output both displayed and redirected to a file at the same time? If, for example, I were to run the command dir > test.txt, this would redirect output to a file called test.txt without displaying the results. How could I … Read more