@echo off
set serverDir=\\10.80.3.252\测试专用(勿动)\packtool_v4.0\config
REM set serverDir=C:\tmp2\config
set localDir=D:\sci\ADT\单机工具
echo -----------------------------------------------
echo 单机工具配置文件更新
:Step1
echo -----------------------------------------------
echo 请选择要操作的文件
set /p choice2=1、ApkUtility 2、BillingGrab 3、KeyWord_Search 4、PackingTool 5、退出 :
:Step1_Next
if %choice2%==1 goto ApkUtility
if %choice2%==2 goto BillingGrab
if %choice2%==3 goto ApkUtility
if %choice2%==4 goto BillingGrab
if %choice2%==5 goto end
REM 设置文件路径参数
:ApkUtility
set FileName=ApkUtility_config.txt
set sourceFile=%serverDir%\%FileName%
set targetFile1=%localDir%\ApkUtility\src\%FileName%
set targetFile2=%localDir%\ApkUtility\ApkUtility_tools\%FileName%
goto Step2
:BillingGrab
set FileName=BillingGrab_config.txt
set sourceFile=%serverDir%\%FileName%
set targetFile1=%localDir%\BillingGrab\src\%FileName%
set targetFile2=%localDir%\BillingGrab\BillingGrab_tools\%FileName%
goto Step2
:KeyWord_Search
set FileName=KWSearch_config.txt
set sourceFile=%serverDir%\%FileName%
set targetFile1=%localDir%\KeyWord_Search\src\%FileName%
set targetFile2=%localDir%\KeyWord_Search\KWSearch_tools\%FileName%
goto Step2
:PackingTool
set FileName=PackingTool_config.txt
set sourceFile=%serverDir%\%FileName%
set targetFile1=%localDir%\PackingTool\src\%FileName%
set targetFile2=%localDir%\PackingTool\tools\%FileName%
goto Step2
:Step2
if i==2 goto Step1_Next
echo -----------------------------------------------
echo 请选择要执行的操作
set /p choice1=1、下载配置文件到本地 2、上传本地配置文件 :
echo -----------------------------------------------
:Step2_Next
if %choice1%==1 goto download
if %choice1%==2 goto upload
:download
echo 下载配置文件到本地...
if exist %sourceFile% echo 复制文件 %sourceFile% 到 %targetFile1%
if exist %sourceFile% copy /Y %sourceFile% %targetFile1%
if exist %sourceFile% echo 复制文件 %sourceFile% 到 %targetFile2%
if exist %sourceFile% copy /Y %sourceFile% %targetFile2%
goto Step1
:upload
echo 上传本地配置文件...
if exist %targetFile1% echo 复制文件 %targetFile1% 到 %sourceFile%
if exist %targetFile1% copy /Y %targetFile1% %sourceFile%
if exist %targetFile1% echo 复制文件 %targetFile1% 到 %targetFile2%
if exist %targetFile1% copy /Y %targetFile1% %targetFile2%
goto Step1
REM 退出
:end
exit
cmd 分支选择示例
于 2016-10-13 17:59:52 首次发布