@echo off REM Media Server Stop Script REM This script stops the running media server echo Stopping Media Server... echo. REM Find and kill Python processes running media_server.main for /f "tokens=2" %%i in ('tasklist /FI "IMAGENAME eq python.exe" /FO LIST ^| findstr /B "PID:"') do ( wmic process where "ProcessId=%%i" get CommandLine 2>nul | findstr /C:"media_server.main" >nul if not errorlevel 1 ( taskkill /PID %%i /F echo Media server process (PID %%i) terminated. ) ) echo. echo Done! Media server stopped. pause