Batch script if findstr TTL
Posted: 11 Aug 2018 06:05
So im trying to write a little script. It should play a sound if my Phone joins my Network.
The Problem is now that if the Phone got detected. It will repeatedly start the Sound. But if done correctly it should only play the sound once and then go back to searching for that Phone. Does anyone know a simple fix? Maybe with an IF conditional?
I haven't been doing much with Batch but i think i got some basic knowledge.
Thanks for your help
Code: Select all
@echo off
:A
ping -n 1 xxx.xxx.xxx.xx | findstr TTL && start airsiren.wav
goto A
I haven't been doing much with Batch but i think i got some basic knowledge.
Thanks for your help