Batch File – Sound Alert on Folder Exist
:TestAgain CLS
IF NOT EXIST c:FOLDERALERT_* GOTO NOALERT
“C:windowssndrec32.exe” /play /Close “C:WINDOWSMEDIAWindows Ringin.wav”
REm Start /MIN “C:Program FilesWindows Media Playerwmplayer.exe” “C:WINDOWSMEDIAWindows Ringin.wav” REM “%SystemRoot%system32SoundRecorder.exe” /CLOSE /PLAY “C:WINDOWSMEDIAWindows Ringin.wav”
PING 127.0.0.1 -n 5 -w 2000 >NUL Rem Taskkill /IM “WMplayer.exe” /F
PING 127.0.0.1 -n 5 -w 2000 >NUL GOTO TestAgain
:NOALERT
PING 127.0.0.1 -n 5 -w 4000 >NUL
GOTO TestAgain