Save Command Line Output to a File

Posted Feb 23, 2006 | by David Risley  

Ever run a program or utility from the command prompt and have output scroll so quickly up the screen you couldn’t read it? Maybe you just want the ability to capture the output so you can review or email it. Simply use the greater than sign (>) and enter a destination file name after the command.

This is an extremely versatile and useful. For example, if you want to create a listing of all your MP3 files in directory C:\Music, try enter the following sequence at the command prompt:

cd \music
dir > c:\my_music.txt

Now go look at your C drive and you should see a file called my_music.txt. Take a look and there are all your files.

Note: this also works in *nix systems.

Which Of These Traits Applies To YOUR Computing Life?...

Leave a Reply