写一段 bat 脚本, 功能是安装当前目录下的所有apk
时间: 2023-07-15 14:14:19 浏览: 122
@echo off
setlocal enableextensions enabledelayedexpansion
set APK_DIRECTORY=%cd%
set ADB_PATH=adb.exe
echo Installing APKs from %APK_DIRECTORY%...
for /r "%APK_DIRECTORY%" %%a in (*.apk) do (
set FILE_NAME=%%a
set FILE_NAME=!FILE_NAME:%APK_DIRECTORY%\=!
set FILE_NAME=!FILE_NAME:\=\\!
echo Installing !FILE_NAME!...
"%ADB_PATH%" install -r "%%a"
)
echo All APKs installed.
pause
exit
阅读全文