bat 汇总
执行程序
@echo off 启动程序 start "EXE python" /d "D:\OneDrive\python\Selenium\testIPC" python checkREC.py #start "窗口名称" /d "文件路径" 解释器 程序名.py
杀掉进程
taskkill /F /IM nginx.exe > nul
注释方法
注释方法1: :: 注释方法2: goto comment1 xxx yyy :comment1
变量
set ASS="D:\chopper\bin\streamserver31.exe" set source="D:\aaa" set output="D:\bbb\ccc" set testcase="D:\ddd\eee" %ASS% -segment -i %source% -o %output%\nonenc_iframe -hls -dash -ss -config "%testcase%\nonenc_iframe.xml"
删除文件夹和等待
rd/s/q D:\source\Live_Source_Server\HLS_live_Source\demuxer\logs rd/s/q D:\source\Live_Source_Server\HLS_live_Source\StreamServer\apps rd/s/q D:\source\Live_Source_Server\HLS_live_Source\StreamServer\logs TIMEOUT /T 10
定时关机
@echo off set /p input="how long after (min):" echo %input% set /a input_min=%input% *60 echo %input_min% for /l %%i in (%input_min%,-1,0) do ( cls echo. echo. echo. echo. counter down sec: %%i ping 127.1 -n 2 >nul ) shutdown -s ::pause exit

浙公网安备 33010602011771号