How to append an output to existing file with DOS and IPerf

Hello Experts,

In the attached batch file I would like to run the three iperf commands:

C:\Users\..\iperf-3.1.3-win32\iperf3 -c 192.168.1.129 -i 1 -t 60 -u -b 1M > iperf-3.csv
C:\Users\..\iperf-3.1.3-win32\iperf3 -c 192.168.1.129 -i 1 -t 60 -u -b 2M > iperf-3.csv
C:\Users\..\iperf-3.1.3-win32\iperf3 -c 192.168.1.129 -i 1 -t 60 -u -b 3M > iperf-3.csv

You will notice that the first iperf commands runs with 1M bandwidth, the second runs with 2M and the third runs with 3M. They all write to a file called iperf-3.csv.

The problem is when I run all three commands in a batch file only the last output from the, C:\Users\..\iperf-3.1.3-win32\iperf3 -c 192.168.1.129 -i 1 -t 60 -u -b 3M > iperf-3.csv is included in the iperf3-.csv file.

Can someone show me how to configure the batch file so that all three outputs are included in the output file 'iperf-3.csv'.

Thank you

Regards
bandwidthtest.zip
LVL 1
Member_2_7966113Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

oBdACommented:
Just double up on the redirection symbol of the last two commands, which appends to an existing file instead of overwriting it:
C:\Users\..\iperf-3.1.3-win32\iperf3 -c 192.168.1.129 -i 1 -t 60 -u -b 1M > iperf-3.csv
C:\Users\..\iperf-3.1.3-win32\iperf3 -c 192.168.1.129 -i 1 -t 60 -u -b 2M >> iperf-3.csv
C:\Users\..\iperf-3.1.3-win32\iperf3 -c 192.168.1.129 -i 1 -t 60 -u -b 3M >> iperf-3.csv

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Member_2_7966113Author Commented:
Great. Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
iperf

From novice to tech pro — start learning today.