@echo off
setlocal enabledelayedexpansion
:1
netstat -an|findstr 1001
if errorlevel 1 (
echo port isn't open
goto 2
) else (
echo port is open
)
ping -n 1 127.1 >nul
timeout /t 1800
goto 1
:2
echo port
批处理 监视端口并根据状态作出反应
最新推荐文章于 2024-04-18 17:49:36 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)