I created a .BAT
file in Windows 10 that has the following lines:
set /p ipadress="Please select your favourite IP-adress."
echo %ipadress%
ping %ipadress% -n 10
However, when I navigate on this batch file to ping, I can see the ping
command repeatedly being executed in a loop. I even tried to rename the ping.BAT
to ping.CMD
but the result is the same.
It works until the second line. After repeating the selected IP address, it ends in a loop and jumps to the beginning of my batch file.
I want to avoid writing ping
command through the command prompt, which is why I created the batch file. I don't know why the ping
command is being continuously called when the same statement is put in a batch file.
Do you have any ideas?
No comments:
Post a Comment