﻿@echo off & setlocal enabledelayedexpansion
  ::ipconfig>ip.txt
  
   
netstat -aon |findstr 8084>pid.txt
      
     for /f "delims=" %%a in (pid.txt) do (
         
      for /f "tokens=1* delims=:" %%i in ('call echo %%a^|find /i "TCP"') do (
         echo %%a
     ::��ȡ�����ݹ��˺�,д����һ�����±���
     rem Echo %%a>>"text.txt"
        ) 
    )
rem ��ȡ�ļ�������
set /P OEM=<pid.txt
  
rem ��ȡ�ļ��е��ַ���
  
echo  %OEM:~71,76%
  
taskkill /f /pid %OEM:~71,76%

@echo off
       cd D:\server\risk\gateway-service
       D:
       if not exist D:\server\risk\backup\gateway\%date:~0,4%%date:~5,2%%date:~8,2% md D:\server\risk\backup\gateway\%date:~0,4%%date:~5,2%%date:~8,2%
       if exist "D:\server\risk\gateway-service\com-crm-gateway-1.0.0.jar" (
	copy "D:\server\risk\gateway-service\com-crm-gateway-1.0.0.jar" "D:\server\risk\backup\gateway\%date:~0,4%%date:~5,2%%date:~8,2%\com-crm-gateway-1.0.0-%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%.jar"
	del "D:\server\risk\gateway-service\com-crm-gateway-1.0.0.jar"
) 

       cd "C:\Users\Administrator\crm\crm-gateway"
       c:
       copy "C:\Users\Administrator\crm\crm-gateway\com-crm-gateway-1.0.0.jar" "D:\server\risk\gateway-service\com-crm-gateway-1.0.0.jar"
       cd D:\server\risk\gateway-service
       D:
       title crm-gateway
       javaw  -Xmx1536m  -Dloader.path=dependency -jar com-crm-gateway-1.0.0.jar --spring.profiles.active=prod
       echo good bye