Skip to content

Instantly share code, notes, and snippets.

@robinfang
Created May 14, 2014 07:32
Show Gist options
  • Save robinfang/51509890967c30be5ebf to your computer and use it in GitHub Desktop.
Save robinfang/51509890967c30be5ebf to your computer and use it in GitHub Desktop.
@echo off
set PATH=%PATH%;C:\Program Files\Git\bin
tasklist|grep java|sed "s/\SYSTEM//g"> e:\pid.txt
for /F "tokens=2" %%a in (e:\pid.txt) do (
taskkill /pid %%a /F
)
del e:\pid.txt
tasklist -v|grep cmd|sed '/restarttomcat.bat/'d> e:\cmdpid.txt
for /F "tokens=2" %%a in (e:\cmdpid.txt) do (
taskkill /pid %%a /F
)
del e:\cmdpid.txt
start D:\tomcat_1\bin\startup.bat
start D:\tomcat_2\bin\startup.bat
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment