Solved

Ping Batch File

Posted on 2013-06-25
3
378 Views
Last Modified: 2013-07-17
I need to create a script which will output the data to one file ...  

I need to run ping -t -n 25 -l 100 192.168.14.253   ......   I need to run this for packet sizes
100, 500, 1000, 1600, 2000   ......  

Is there anyone that has a vb or windows script to acheive this .......

Thanks ....

Joel
0
Comment
Question by:jtbrown1111
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
Kyle Abrahams earned 500 total points
ID: 39276417
This is a start:

launch.bat
===========================
start test.bat 100
start test.bat 500
start test.bat 1000


test.bat
=====================================
ping -t -n 25 -l %1  192.168.14.253  >> %1.log


Unfortunately it fails when you try to write to the same log.  Can you write to multiple logs?
Perhaps add a timestamp and merge them later?
0
 

Author Comment

by:jtbrown1111
ID: 39276461
what I came up with is

for %a in (500, 750, 1000, 1600, 2000) do ping -t -n 5 -l %a 192.168.14.253 > >c:\ping.txt

seems to work fine if I create a blank file first ...... ..........        Thanks everyone
0
 
LVL 40

Expert Comment

by:Kyle Abrahams
ID: 39278170
confirm that you get the 750 and 1000 values?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This collection of functions covers all the normal rounding methods of just about any numeric value.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now