Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm console application and want to save the output to a text file. So I do this:

Pi.exe > Pi.txt

Then open the text file and see this:

Calculating Pi to 10,000 decimal places...

Then I se Pi (3.14...)

How can I have the command prompt remove the Calculating Pi to 10,000 decimal places...?

share|improve this question
up vote 2 down vote accepted

If you wrote Pi.exe or can change it, the best two options are

  • Change Pi.exe to take a -q option to run 'quietly'
  • Have Pi.exe output 'Calculating Pi' etc to stderr, instead of stdout


  • Pipe through find /v first:

    Pi.exe | find /v "Calculating Pi" > pi.txt

It will capture only lines that don't contain "Calculating Pi".

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.