Save Command Prompt output to text file

Save Command Prompt output to text file:-

Save command prompt output to text file : It’s easier than others while you wish to save command prompt output to text file. Saving output of a command prompt isn’t that much harder. we can make it by simply using an operator and the required file format. For example now am going to Save command prompt output to text file. Just follow the simple way to get it done.

For example consider and scenario that you’re going to ping a ip address and want to know the flapping time. But you can’t sit in front of a black screen for a long while. But by following this way you can store the ping responses and can view at anytime you wish.

Steps to Save command prompt output to text file:
  • Open your command prompt window and navigate to desktop.you can do this in two ways.
  1. Shift+right click on desktop and select open command window here

    open command window from desktop
    open command window from desktop
  2. Or open command prompt from run or search menu and navigate to desktop.
    change directory
    change directory

     

  • consider that am going to save ping values of google.type the following command in command prompt
    ping google
    ping google

    command that i have used : [sociallocker]ping google.com > ping.txt[/sociallocker]

  • Now you’ll see that a pinging process will be handled in background

    saving ping response to text file
    saving ping response to text file
  • After completing ping you will get the following window. your ping must have got finished.

    ping finished
    ping finished
  • you’ll see that a new text document with name ping in your desktop is created while pinging.
  • open the text document and verify your output.

    ping result in text file
    ping result in text file

How does it worked?. That’s simple. i just used “>” operator to make it work. the operator will append the output to specified file.

This is how you can save command prompt output to a text. In most cases it’ll work .

I will show how to save output of batch file to a text file.