Command Prompt Command?

What prompt in command prompt allows me to save a log of a previous command?

For example, if I typed in "dir /S C:", what command would let me save the results as a txt file?
3 answers 3