I want to execute some commands and download things with batch
There are multiple servers and I want to load balance it. There is also the reason for the network. So I want to test with tcping
There is a problem now that the return value of the for execution command cannot be obtained The tcping tool I use: https://github.com/cloverstd/tcping
code:
for /F %%a in (‘powershell ./tcping.exe -H https://a.server…’) do @set server1=%%a
echo “%server1%”
The content returned after execution: Minimum
Expected return: Minimum = 100.0000ms, Maximum = 100.000ms, Average = 100.0000ms
The value of for can only get the first one (Minimum ) Not all content returned because there is a space. The test is the same for other commands, and it will be terminated when a space is encountered.
So there is no way to get the latter value
I read Microsoft's doc, and command help, which doesn't mention more about what set returns for command
Is there any solution?
Also, I'm new to programming and it's not that long. Also not very good at using this community. If there is something wrong, please forgive me