1. 程式人生 > >android檔案匯入匯出工具.cmd

android檔案匯入匯出工具.cmd

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