window cmd窗口下关闭指定端口的程序
for /f "tokens=5" %i in ('netstat -ano ^| findstr 62345') do taskkill /f /pid %i /t
window 批处理文件下关闭指定端口的程序
for /f "tokens=5" %%a in ('netstat -ano ^| findstr 68375') do taskkill /f /pid %%a
window 批处理文件下完整的执行文件
start cmd /c "for /f "tokens=5" %%a in ('netstat -ano ^| findstr 62345') do taskkill /f /pid %%a" & start E:\Java\Git\Git\git-bash.exe -c 'rclone mount emdyDownPTC:/ W: --cache-dir F:\\RcloneCache --vfs-cache-mode writes --no-modtime --ignore-errors --no-console --rc --rc-addr localhost:62345'