bat批处理切换不同版本地址

@echo off
:: 关闭服务
net stop tomcat
net stop tomcat6
:: 暂停1秒
ping 1.1.1.1 -n 1 -w 1000 >nul

:: 结束进程
taskkill /F /IM AXAdWebBrowser.exe
taskkill /F /IM AXWebBrowser.exe
taskkill /F /IM CSHttpDownloader.exe
ping 1.1.1.1 -n 1 -w 3000 >nul

:: 判断文件是否存在
if exist "D:\ssk-website" (
echo 移动D盘根目录文件成功
:: 切换txt内容里面的路径,并移动文件进去
for /f %%i in ('type D:\version.txt') do cd D:\deploy\%%i
	move D:\ssk-website
	move D:\AXUpdate
	move D:\*.txt
)
	echo 移动shangha版本到D盘根目录成功
	move D:\deploy\shanghai\ssk-website D:\
	move D:\deploy\shanghai\AXUpdate D:\
	move D:\deploy\shanghai\*.txt D:\

ping 1.1.1.1 -n 1 -w 3000 >nul
net start tomcat
net start tomcat6

ping 1.1.1.1 -n 1 -w 3000 >nul
start "AXAdWebBrowser" "D:\AXAdsBrowser\AXAdWebBrowser.exe"

start "CSHttpDownloader" "D:\AXUpdate\CSHttpDownloader.exe"

echo 操作成功,按任意键退出
:: pause > nul

 

你可能感兴趣的:(cmd,bat,task,move)