基础

windows 批处理程序

2019-08-09  本文已影响0人  人生如茶几

@echo off

echo "欢迎来到非常BAT!"

d:

cd D:\devTools\nginx-1.10.3\nginx-1.10.3

start nginx.exe

pause


@echo off

setlocal enabledelayedexpansion

set port=8081

for /f "tokens=1-5" %%a in ('netstat -ano ^| find ":%port%"') do (

    if "%%e%" == "" (

        set pid=%%d

    ) else (

        set pid=%%e

    )

    echo !pid!

)

if NOT "!pid!" == "" (

  taskkill /f /pid !pid!

)

java -jar mk-platform-RELEASE-2.2.0.jar

上一篇下一篇

猜你喜欢

热点阅读