How to save Ping Report in text file?

How to save Ping Report in text file?

Windows allows you to send a message, called a ping to other computers in your local network. If you would like to export the result of a ping command to a text file, here is how you can perform this action.

How to create a ping file?

  • To create a ping file, open Notepad.
  • Then, enter the following command: ping ipaddress (you should replace ipaddress with the IP to be pinged)
  • If you want the output to be saved to a file, re-write the command as follows: ping ipaddress >> C:\(path to the file).
  • Save your file as ping.bat.
  • When saving, save your file as "All files" not as . txt.

How to automatically export the result of a ping command?

To automatically export the result of a ping command to a file, you can use the command-line capabilities of your operating system to run the ping command and redirect its output to a file. Below are instructions for how to do this on Windows and Linux/macOS.

Windows (Command Prompt)

You can use the ping command in Windows Command Prompt and redirect its output to a text file using the > or >> operators.

To overwrite an existing file:

ping example.com > ping_result.txt

To append to an existing file or create one if it doesn't exist:

ping example.com >> ping_results.txt

Replace example.com with the target domain or IP address you want to ping. The results will be saved in the specified file: (ping_result.txt in this example). 

Linux/macOS (Terminal)

You can use the ping command in a terminal on Linux and macOS and redirect its output to a text file using the > or >> operators, just like in Windows.

To overwrite an existing file:

ping example.com > ping_result.txt

To append to an existing file or create one if it doesn't exist:

ping example.com >> ping_results.txt

Again, replace example.com with the target domain or IP address.

How to send Ping and Trace Route results?

  • Create a folder where you can save the results
  • Open Command PromptWindows Key > Enter CMD Enter
  • Enter one of the following commands:

Normal Ping - ping [IP Address] >[File Location]\pingresults.txt

Continuous Ping - ping [IP Address] -t >[File Location]\pingresults.txt 

  • For this one you will need to end the command with Ctrl+C

Trace route - tracert [IP Address] >[File Location] \tracert.txt

  • Once the procedure has finished, the results sill be saved into as a text file in the pre-established folder
Do you need more help with Windows? Check out our forum!

Around the same subject

Windows