adb pull 某一路徑下的同一類文件
@echo off
setlocal enabledelayedexpansion
if %1.==. (
echo Wilcard parameter is required.
goto end
)
for /F "tokens=* USEBACKQ" %%F in (`adb shell ls %1`) do (
set text=%%F
set mfile=!text!
adb pull "!mfile!" %2
)
:end
endlocal
使用方式:
以上代碼保存成一個 bat 腳本 pull.bat
,同目錄下運行:pull /sdcard/*img.jpg ./localdir
即可。