赞
踩
@echo off
:main
set dirname=
set buildPath=/mnt/sdcard/
:selectPath
cls
echo 当前路径:%~dp0
echo ------------------------------
echo y : 确认使用目录:%buildPath%%dirname%
echo q : 返回重新选择
echo w : 返回上一级目录
echo r : 刷新目录列表
echo ------------------------------
adb shell ls %buildPath%/%dirname% -la
set /p sel=选择目录:
if %sel%==q (
goto main
) else if %sel%==r (
goto selectPath
) else if %sel%==w (
call :backdir %buildPath:~0,-1%
goto selectPath
) else if %sel%==y (
call :buildCommand %buildPath% %dirname%
goto loop
) else (
set buildPath=%buildPath%%dirname%/
set dirname=%sel%
goto selectPath
)
:backdir
if %~n1==sdcard (
goto main
)
set pdir=%~p1
set buildPath=%pdir:\=/%
set dirname=%~n1
goto :eof
:buildCommand
set pull=pull %1%2 .\
set push=push .\%2\ %1
goto :eof
:loop
echo ------------------------------
echo 1 : adb %pull%
echo 2 : adb %push%
echo q : 返回重新选择
echo w : 返回上一级目录
echo ------------------------------
set /p sel=select:
if %sel%==q (
goto main
) else if %sel%==w (
call :backdir %buildPath:~0,-1%
goto selectPath
) else if %sel%==1 (
adb %pull%
) else if %sel%==2 (
adb %push%
) else (
start cmd
)
goto loop

赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。