Page 1 of 1

Batch to create an ping and tracert log

Posted: 11 Jul 2022 06:24
by Dasmius
Supp guys,

I need some help to create an batch file that colect ping and tracert info form some IP's in a txt filer. And I have no idea how to do it, can anyone help me with?

Thx ppl!

Re: Batch to create an ping and tracert log

Posted: 11 Jul 2022 09:05
by ShadowThief
Just stick a >>file.txt after each command to add the output to file.txt.

Code: Select all

ping google.com >>file.txt
tracert google.com >>file.txt
You can also stick the redirection in front of the command.

Code: Select all

>>file.txt ping google.com
>>file.txt tracert google.com
You can also use parentheses if you don't want to type so much.

Code: Select all

>>file.txt (
	ping google.com
	tracert google.com
)

Re: Batch to create an ping and tracert log

Posted: 11 Jul 2022 12:00
by Dasmius
Got it, I'l try it.

Thx bro ^^