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
即可。