android文件导入导出工具.cmd

版权声明:***本文为博主原创文章,未经博主允许不得转载。*** https://blog.csdn.net/rrrrrr123rrr/article/details/77929864

android文件导入导出工具

使用截图

这里写图片描述

android文件导入导出工具.cmd

@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

猜你喜欢

转载自blog.csdn.net/rrrrrr123rrr/article/details/77929864
今日推荐