Save Command Line Output to a File

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.

Free eBook!

Like what you read?

If so, please join over 28,000 people who receive our exclusive weekly newsletter and computer tips, and get FREE COPIES of 5 eBooks we created, as our gift to you for subscribing. Just enter your name and email below:

Post A Comment Using Facebook

What’s Your Preference?

Daily Alerts

Each day we send out a quick email to thousands of PCMECH readers to notify them of new posts. This email is just a short, plain email with titles and links to our latest posts. You can unsubscribe from this service at any time.

You can subscribe to it by leaving your email address in the following field and confirming your subscription when you get an email asking you to do so.

Enter your email address for
Daily Updates:

Weekly Newsletter

Running for over 6 years, the PCMECH weekly newsletter helps you keep tabs on the world of tech. Each issue includes news bits, an article, an exclusive rant as well as a download of the week. This newsletter is subscribed to by over 28,000 readers (many who also subscribe to the other option) - come join the community!

To subscribe to this weekly newsletter simply add your email address to the following field and then follow the confirmation prompts. You will be able to unsubscribe at any time.

Enter your email address for
Free Weekly Newsletter: